View Single Post
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