08-03-2016, 05:09 PM | #1 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Motorola Xoom
|
Fetching metadata with CLI
I know about fetch-ebook-metadata, but I can't figure out how to use it properly with my library. What exactly do I need to do to fetch and attach the downloaded metadata?
I need to do this with a CLI as I run calibre on my headless ubuntu server. I installed from the official calibre site, I did not use the package in apt. |
08-03-2016, 06:11 PM | #2 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
`fetch-ebook-metadata` is not a CLI for the library, it is a CLI for individual books.
Last edited by eschwartz; 08-03-2016 at 10:01 PM. Reason: consistent ordering |
Advert | |
|
08-03-2016, 08:31 PM | #3 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Motorola Xoom
|
I got through to step 2, but where does it save the metadata opf? It wasn't in my active directory
|
08-03-2016, 09:12 PM | #4 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
It is printed to stdout (did you try it and see?), so you will have to redirect it to a tmpfile or perhaps do something with named pipes.
|
08-03-2016, 09:13 PM | #5 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Motorola Xoom
|
I used "-o test.opf" and the opf was nowhere to be found
|
Advert | |
|
08-03-2016, 09:56 PM | #6 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Motorola Xoom
|
Ok so I think I got it with
Code:
$ fetch-ebook-metadata -t "title" -a "author" -o metadata.opf > metadata.opf $ ebook-meta --from-opf metadata.opf "/path/to/book" |
08-03-2016, 10:03 PM | #7 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
`ebook-meta` only modifies the metadata inside the book, not the library metadata. This is true in the GUI and it doesn't change when using the command-line.
That is why my instructions above referenced the `calibredb` commands, for manipulating the metadata inside the calibre library database. |
08-03-2016, 10:08 PM | #8 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Motorola Xoom
|
See you put ebook-meta first so I figured it would be the better of the commands
|
08-03-2016, 10:13 PM | #9 |
Junior Member
Posts: 6
Karma: 10
Join Date: Aug 2016
Device: Motorola Xoom
|
That worked though, thank you very much for your help
|
08-03-2016, 10:36 PM | #10 |
Ex-Helpdesk Junkie
Posts: 19,422
Karma: 85397180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
|
Tags |
cli, metadata |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Metadata Source Plugin] Amazon.com not fetching all descriptions | StillReading | Calibre | 4 | 01-09-2016 08:02 AM |
Saving metadata and covers with the cli interface not working properly | Kode | Calibre | 9 | 11-09-2014 06:29 PM |
Prevent downloading tags when fetching metadata? | Hi! | Calibre | 4 | 09-06-2009 08:42 AM |
Adding online metadata using ISBN from CLI | EditorJack | Calibre | 17 | 01-20-2009 01:47 AM |