Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 08-27-2010, 02:41 PM   #1
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
Autotagging with Calibre (command line)

Hello,

I am wondering if Calibre is able to set an epub's metadata using internet sources such as librarything, amazon, etc.
I know that the GUI is able to do that, however due to QT's certain limitations I am not really able to use it that way.
I am able to get book information using librarything and fetch-ebook-metadata, however I need a way to actually put the retrieved info into the .epub book itself.
An alternative would be to edit the xml data directly, however that gets a bit tedious if you happen to have a large library.

Erion
erion is offline   Reply With Quote
Old 08-27-2010, 03:12 PM   #2
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,782
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Explore the rest of the command line interface it includes tools tp update metadata in book files and in the calibre db
kovidgoyal is online now   Reply With Quote
Advert
Old 08-27-2010, 03:41 PM   #3
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
Hello,
Thank you for your reply.
Maybe it's just me, but I'm unable to find such an option. I saw the option to update metadata, but it's from an opf file, or from the command line itself via options (e.g. -t, -a, etc).
This would work nicely if the tools which get metadata information would return for example an .opf file, but currently I have to redirect the output of either librarything or fetch-ebook-metadata to the StdOut, open the file in a text editor and call ebook-meta with the appropriate parameters based on the content of the saved file.

Erion
erion is offline   Reply With Quote
Old 08-27-2010, 03:49 PM   #4
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,668
Karma: 127838212
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Librarything is hardly the most reliable source. I do have an account that I do not use because of some serious errors that the people in charge never felt like fixing after I reported a few times. Goodreads has librarians that actually respond and do fix errors.
JSWolf is offline   Reply With Quote
Old 08-27-2010, 03:59 PM   #5
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,782
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You'll have to write a small script to extract the info from the output of fetch-ebook-metadata shouldn't be too hard.
kovidgoyal is online now   Reply With Quote
Advert
Old 08-27-2010, 05:15 PM   #6
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
Hello,
Thank you very much.
Somehow I knew it'll end that way.
Anyways, Calibre is by far the best!

Erion
erion is offline   Reply With Quote
Old 08-28-2010, 07:34 AM   #7
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
Hello,
My script is working fine now, except for the comment.
A book has usually a description which spawns more lines, but Microsoft's command line has a serious limitation whereas it interprets a new line character as a new command. This results in a comment tag which has the first line of the comment, while the rest is ignored.
Does Calibre have a special character which could signify a new line, and which is accepted by the standard windows command line interpreter (cmd)?

Erion
erion is offline   Reply With Quote
Old 08-28-2010, 12:14 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,782
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
why not redirect the output to a file?
kovidgoyal is online now   Reply With Quote
Old 08-28-2010, 12:50 PM   #9
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
Hello,
You mean the input... No, sadly ebook-meta won't accept commands from the StdIn when I specify a file, e.g.
Code:
ebook-meta <file.txt
Erion
erion is offline   Reply With Quote
Old 08-28-2010, 01:21 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,782
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No I meant write out the metadata as an opf file (it's a simple xml file) and use --from-opf option of ebook-meta
kovidgoyal is online now   Reply With Quote
Old 08-28-2010, 01:31 PM   #11
erion
Member
erion began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Aug 2010
Device: none
Hello,

Oh I see. Is there a sample .opf file somewhere I could use to convert the output of fetch-ebook-metadata?

Erion
erion is offline   Reply With Quote
Old 08-28-2010, 01:33 PM   #12
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
You can always create one from within Calibre by using the Save to Disk command and ticking the option to create the .opf file.
itimpi is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Calibre Command line and .bat file stratman Calibre 15 01-10-2012 05:38 PM
Calibre Command Line usage with PHP artoros Related Tools 13 07-01-2010 09:57 AM
Specify liberary path in command line when launching calibre rollercoaster Calibre 2 03-04-2010 12:08 AM
Calibre Command Line Interface TOC bcolflesh Calibre 3 02-04-2010 04:09 PM
calibre command line utilities and calibre defaults astrodad Calibre 2 08-07-2008 03:27 PM


All times are GMT -4. The time now is 04:37 AM.


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