View Single Post
Old 11-20-2011, 09:49 AM   #4
Mar2zz
{insert custom title}
Mar2zz began at the beginning.
 
Posts: 13
Karma: 10
Join Date: Sep 2010
Location: North of Ned'r Landum
Device: Bebook Reader 2010
I succeeded in writing a bash script that does the following:
- import all ebooks from a folder to a calibredatabase
- list all new imported books
- fetch ebook metadata and cover.jpg for all those new books and save it in the right location
- restart my calibre-server (or else new books aren't listed)

But, I used a lot of workarounds because of lack of documentation on calibredb add/list and fetch-ebook-metadata's options. Or maybe it's lack of features?

For example, listing all new books in a library is done easier with a "find -mindepth 2 -newer /tmp/checkfile -type d" command than calibredb list. (it's a lot faster, that's for sure)
Also, for running fetch-ebook-metadata to fetch correct data and cover, I need to specify author, title and location where to save it, and echo found metadata into that location into a metadata.opf file. If no metadata is found it will save an empty metadata file. So I needed to create all kinds of workarounds to get what I want. But I keep thinking there maybe is an easier way.

So I have those questions:
1. listing all new books in the db with calibredb list is impossible if they are imported in the last 5 minutes?
2. fetch-ebook-metadata cannot be linked to existing books in a db and fetch for those?
3. Savepaths for metadata.opf and cover.jpg need to specified all the time.
4. option: Savepath for metadata.opf does not exist, it just prints to console?
5. calibre-server isn't aware of new books until restarted, can it be made to check itself once in a while and update without restarting? like calibre-server --ctime=1h or --ctime=30m?
Mar2zz is offline   Reply With Quote