Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 01-18-2022, 10:46 AM   #1
travtufts
Junior Member
travtufts began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2011
Device: Kindle
Command Line to add formats from directory to calibredb

Hi all,

I'm not very proficient working with command line, but was able to batch convert my entire Calibre library of EPUBs to kepub format using kepubify in the terminal on Mac OS.

I KNOW this is not what many of you would advise since I shouldn't be mucking around underneath the file structure of Calibre. But it's done now.

Is there a way to batch update the database so Calibre recognizes the additional formats of the existing books? I know I can do it one by one in the GUI but I'm hoping there's a more elegant way to do it by batch in the terminal.

Thank you!
travtufts is offline   Reply With Quote
Old 01-18-2022, 10:58 AM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,860
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibredb add_format book_id /path/to/format/file

https://manual.calibre-ebook.com/gen...calibredb.html

But you will have to write a script that traverses the calibre library folder gets the path to the kepub file, extracts the book_id fromthe foldername and then moves the kepub file to /tmp and calls calibredb add_format to add it properly.
kovidgoyal is offline   Reply With Quote
Reply

Tags
calibredb, calibredb calibre-server, kepubify


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Defining Metadata with "calibredb add" command line function. macr0t0r Calibre 3 03-01-2012 07:36 PM
calibredb command line question (setting metadata) mezme Calibre 0 12-06-2011 12:17 AM
Slow calibredb add on huge ebooks directory ternyk Library Management 8 05-17-2011 04:39 AM
<Command Line> Add multiple books in multiple formats himitsu Calibre 8 09-25-2010 11:07 PM
Command line calibredb set_metadata problem Nedan Calibre 1 02-27-2009 08:44 PM


All times are GMT -4. The time now is 07:19 PM.


MobileRead.com is a privately owned, operated and funded community.