07-13-2020, 04:12 AM | #1 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Add reoccurring newspaper issues with mainy same fields
Weekly I add a new issue of a newspaper epub where author, publisher, tags and language stay the same.
Unfortunately they are nor correctly set in the ePUB's metadata, so every week after adding the issue (via `calibredb add`) I copy-paste in the UI the metadata from last week's issue. Tedious! Is there a way to automate this? Maybe with an "add template"? Or with an template .OPF file next to the epub file on import? Thanks for any pointer! |
07-13-2020, 04:46 AM | #2 |
creator of calibre
Posts: 44,434
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can set the title/author/tags/languages via options to the calibredb add command. Or you can use the ebook-meta command to fix them in the epub before adding.
|
Advert | |
|
07-13-2020, 04:51 AM | #3 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
|
07-13-2020, 10:04 PM | #4 | |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Hi Kovid,
Quote:
Code:
calibredb --with-library http://localhost:8282/ add --authors=Multiple --tags=germany,news --languages=deu -1 <dir-with-pdf+epub> The book with the PDF and ePUB files is added to the library (so the Enable Local Write works), but the added book does not have "Multiple" in the Authors field. Why's that and how can I fix it? Many thanks for any help. |
|
07-13-2020, 10:41 PM | #5 |
creator of calibre
Posts: 44,434
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Works fine for me. And you can simply use ebook-meta to set the metadata in the files before adding them.
|
Advert | |
|
07-15-2020, 01:29 AM | #6 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
For me it only works when I add an individual file (say a PDF), but when I add PDF, mobi and epub in a folder with the -1 option, the author field on the book does not get set from the --author option, but is taken from one of the files in the folder.
|
07-15-2020, 01:43 AM | #7 |
creator of calibre
Posts: 44,434
Karma: 24044628
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Yes when you add many files, the option does not apply, metadata is read from the files, so as I said use ebook-meta to set the metadata in the files before adding. Or use calibredb set_metadata to set the metadata after adding.
|
07-20-2020, 03:39 AM | #8 |
Groupie
Posts: 156
Karma: 12649
Join Date: Feb 2020
Device: iPad
|
Thanks, calibredb set_metadata works well for me.
However it is slightly cumbersome to parse the new book ID from the natural language response of calibredb add in order to use it with calibredb set_metadata... But once the parsing is in place it works reliably. :-) |
Tags |
calibre, import, metadata |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add fields like Author to the mask? | tozzi | Calibre | 9 | 07-07-2020 02:45 AM |
Calibre Content Server 3.0 - add fields to be displayed | daz-uk | Calibre | 14 | 07-07-2017 07:20 PM |
Strange issues when editing Comments and Annotations fields | brainvision | Calibre | 5 | 11-02-2013 03:54 PM |
Sigil metadata - is it possible to add fields | Mr Pointy | Sigil | 6 | 06-17-2013 10:39 PM |
Newspaper issues/comments | robko | Kobo Reader | 4 | 10-30-2010 10:32 AM |