Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-06-2024, 04:08 PM   #1
europas_ice
Groupie
europas_ice doesn't littereuropas_ice doesn't littereuropas_ice doesn't litter
 
europas_ice's Avatar
 
Posts: 190
Karma: 220
Join Date: Aug 2007
Location: Moscow, ID
Device: iPhone 11 (Kindle app & iBooks)
"ebook-convert" command-line metadata add DOI

I'm using calibre's command-line "ebook-convert" with various tags to add metadata to my epubs; ie, this works great:

Code:
ebook-convert Ivanov2025.epub Ivanov2025-metafy.epub --tags new --publisher "Icarus" --pubdate "15 March 2025"
The only lingering thing is that I would like to add the DOI the same way. I can do this in the GUI by: right-click on book > Edit metadata > Edit metadata individually, and then I manually type in the "Ids:" box: "doi:10.1016/j.icarus.2024.116404". This works fine, but my goal is to automate it by adding it to the command-line code above; is that possible? I have tried it this way:

Code:
ebook-convert Ivanov2025.epub Ivanov2025-metafy.epub --tags new --publisher "Icarus" --pubdate "15 March 2025" --isbn "10.1016/j.icarus.2024.116404"
And this also works to some extent: after running that command, when I go into the GUI Edit metadata interface, in the "Ids:" box it now says "isbn:10.1016/j.icarus.2024.116404" But of course it isn't an ISBN and Calibre knows it: there's a big red box around it. I can now just manually change the letters "isbn" to "doi" so it reads: "doi:10.1016/j.icarus.2024.116404"; at least I don't have to copy and paste the DOI itself. But my goal is to do it all from the command-line without having to go into the GUI.

I suppose: I'm asking for --doi to be added to the ebook-convert metadata options!

Any chance of this? Or any way I can fudge it in a shell or python script? Thanks!
europas_ice is offline   Reply With Quote
Old 12-06-2024, 04:45 PM   #2
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,389
Karma: 8012652
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Use ebook-meta after or instead of ebook-convert.
chaley is offline   Reply With Quote
Advert
Old 12-06-2024, 05:08 PM   #3
europas_ice
Groupie
europas_ice doesn't littereuropas_ice doesn't littereuropas_ice doesn't litter
 
europas_ice's Avatar
 
Posts: 190
Karma: 220
Join Date: Aug 2007
Location: Moscow, ID
Device: iPhone 11 (Kindle app & iBooks)
Ha, that works perfectly! Thanks!

ebook-meta $FILE.epub --tags new --publisher "$PUBLER" --date "$PUBDT" --identifier "doi:$DOI"
europas_ice is offline   Reply With Quote
Reply

Tags
calibre, command line, doi, ebook-convert, metadata


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to run Calibre's "Check book" tool from the command line? py_make_book Editor 2 07-05-2022 11:39 PM
Linux / Command Line / search and add metadata plittlefield Library Management 3 06-24-2016 12:45 PM
How to "Install Command Line Tools" on version 2.37.1 SilverWinter Calibre 13 12-08-2015 07:45 AM
"Remove the dependency on the zip command line tool when developing plugins"? JimmXinu Plugins 2 07-13-2012 02:09 PM
Defining Metadata with "calibredb add" command line function. macr0t0r Calibre 3 03-01-2012 07:36 PM


All times are GMT -4. The time now is 02:51 AM.


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