Register Guidelines E-Books Search Today's Posts Mark Forums Read

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

Notices

Reply
 
Thread Tools Search this Thread
Old 01-01-2017, 05:46 PM   #1
craig.trader
Junior Member
craig.trader began at the beginning.
 
craig.trader's Avatar
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Android
Updating Books/Metadata on Import

I'm using Linux and Calibre 2.75.

I have a lot of ebooks (EPUB format) that are created or updated automatically via a script. I want to import these books into Calibre so that they can be searched / served. This is easy the first time, but if I update one or more books, I want to be able to re-import the entire collection, but only have the changed books updated in Calibre. (Updates are generally because of new/better templates, additional metadata, or added chapters to existing books.)

I have tried the following:
  1. calibredb add without --duplicates
    Result: no books were imported / updated (because they already exist).
  2. calibredb add with --duplicates
    Result: two entries for every book in the collection, the second with updated metadata.
  3. Calibre GUI add all books from a subdirectory
    Result: two entries for every book in the collection, the second with updated metadata.
  4. Calibre GUI add all books from a subdirectory, with automerge set to overwrite duplicates of existing formats.
    Result: all books were imported / updated, even the ones that hadn't changed. Cover thumbnails for existing books that did not have embedded covers were not updated.

I would greatly appreciate suggestions.
If I need to write a script, I would rather write a standalone script instead of a plugin (so I can just add it to my normal publish process).

- Craig -
craig.trader is offline   Reply With Quote
Old 01-01-2017, 08:55 PM   #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: 45,209
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
What you are looking for is

calibredb add_format
kovidgoyal is offline   Reply With Quote
Advert
Old 01-02-2017, 08:45 AM   #3
craig.trader
Junior Member
craig.trader began at the beginning.
 
craig.trader's Avatar
 
Posts: 2
Karma: 10
Join Date: Jan 2017
Device: Android
Quote:
Originally Posted by kovidgoyal View Post
What you are looking for is

calibredb add_format
Yes, I had looked at that, but it requires me to know Calibre's id for a previously imported book, which admittedly, I can get from calibredb list. Since I know which files I've changed, I could use that to selectively update Calibre.

Unfortunately, what calibredb add_format does not do is update the Calibre metadata for the existing entry. It also does not generated a new cover thumbnail from the book.

I suppose I could just use the id and remove any books before updating them, and then add them one-by-one, but then the Calibre id will keep changing, which will probably be hard on anyone trying to read the book or keep things in sync.

Any other suggestions?

Last edited by craig.trader; 01-02-2017 at 08:47 AM.
craig.trader is offline   Reply With Quote
Old 01-02-2017, 09:04 AM   #4
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: 45,209
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Umm there are commands to accomplish all those tasks in the calibre command line interface.

To find a book id

calibredb search

to get book metadata

ebook-meta --as-opf

to update metadata in a book record

calibredb set_metadata --from-opf

and so on. You just need to compose them correctly.
kovidgoyal is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Updating metadata on Calibre for books already on Kindle melovesflying Devices 4 05-16-2016 03:28 AM
Matched books, metadata not updating Mama Zappa Library Management 1 03-23-2016 11:40 PM
5 hours updating metadata after downloading meta data for 300 books on i-3770k N13L5 Calibre 15 11-16-2014 05:57 AM
Mass import of books metadata from an ASCII file: HELP NEEDED LARdT Calibre 4 07-08-2010 04:05 PM
Updating metadata on books already uploaded to the PRS700 dpayment Calibre 1 01-23-2009 01:11 PM


All times are GMT -4. The time now is 06:13 PM.


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