Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2018, 07:47 AM   #1
plo233
Member
plo233 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2017
Device: Android tablet
Calibre Python code for fetching by asin/googleid

Is there a portion of Calibre Python code that's easy to reuse/adapted to fetch metadata using an asin or googleid, preferably with the option to specify the host? I was looking in src/calibre/ebooks/metadata/ but there's a lot more going on than this simple function.

This is for importing books into calibre using an external script. Usually use fetch-ebook-meta but that only works for isbn or name/author, whereas the Calibre interface seems to be able to fetch based on asin or googleid.
plo233 is offline   Reply With Quote
Old 08-24-2018, 11:17 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,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
No there is no such portion. fetch-ebook-metadata uses the same code internally as the GUI, someone simply needs to command line option to it to specify identifiers.
kovidgoyal is offline   Reply With Quote
Advert
Old 08-24-2018, 11:55 PM   #3
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,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
https://github.com/kovidgoyal/calibr...544a97693ed206
kovidgoyal is offline   Reply With Quote
Old 08-26-2018, 08:15 PM   #4
plo233
Member
plo233 began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Sep 2017
Device: Android tablet
Quote:
Originally Posted by kovidgoyal View Post
Awesome thank you!
plo233 is offline   Reply With Quote
Old 08-29-2018, 12:00 PM   #5
BeckyEbook
Guru
BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.BeckyEbook ought to be getting tired of karma fortunes by now.
 
BeckyEbook's Avatar
 
Posts: 692
Karma: 2180740
Join Date: Jan 2017
Location: Poland
Device: Misc
Quote:
Originally Posted by kovidgoyal View Post
Should not it be opts.identifier instead of opts.identifiers?
BeckyEbook is offline   Reply With Quote
Advert
Old 08-29-2018, 09:30 PM   #6
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,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes and it was already fixed some time ago.
kovidgoyal is offline   Reply With Quote
Old 11-16-2018, 06:16 AM   #7
Bruno_Little
Junior Member
Bruno_Little began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Nov 2018
Device: none
Moderator Notice
spam deleted

Last edited by chaley; 11-16-2018 at 02:16 PM. Reason: Spam deleted
Bruno_Little is offline   Reply With Quote
Reply

Tags
calibre, metadata, python, script, scripting


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to force calibre to download only the Kindle ASIN? Jake Chambers Library Management 12 06-03-2017 01:19 PM
How to get book cover width and height in Calibre Python code? datcha Library Management 3 02-11-2016 09:55 AM
Fetching Lenta.ru from python script johanp Recipes 0 01-06-2013 11:43 AM
Running recipe error: Python function terminated unexpectedly (Error Code: 1) jpassarella Recipes 0 10-05-2012 12:54 PM
Proper code for fetching Print Version from WSJ and NYT? brad382 Calibre 1 12-20-2008 01:06 PM


All times are GMT -4. The time now is 04:11 PM.


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