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

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

Notices

Reply
 
Thread Tools Search this Thread
Old 08-24-2018, 08:47 AM   #1
plo233
Member
plo233 began at the beginning.
 
Posts: 10
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-25-2018, 12:17 AM   #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: 33,608
Karma: 10209526
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-25-2018, 12:55 AM   #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: 33,608
Karma: 10209526
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, 09:15 PM   #4
plo233
Member
plo233 began at the beginning.
 
Posts: 10
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, 01:00 PM   #5
BeckyEbook
Zealot
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: 136
Karma: 481790
Join Date: Jan 2017
Location: Poland
Device: Kindle (Key3, PW2, PW3), Nook (ST, GLP), Kobo Touch, Tolino Vision 2
Quote:
Originally Posted by kovidgoyal View Post
Should not it be opts.identifier instead of opts.identifiers?
BeckyEbook is online now   Reply With Quote
Advert
Old 08-29-2018, 10: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: 33,608
Karma: 10209526
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Yes and it was already fixed some time ago.
kovidgoyal is offline   Reply With Quote
Reply

Tags
calibre, metadata, python, script, scripting

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:19 PM
How to get book cover width and height in Calibre Python code? datcha Library Management 3 02-11-2016 10:55 AM
Fetching Lenta.ru from python script johanp Recipes 0 01-06-2013 12:43 PM
Running recipe error: Python function terminated unexpectedly (Error Code: 1) jpassarella Recipes 0 10-05-2012 01:54 PM
Proper code for fetching Print Version from WSJ and NYT? brad382 Calibre 1 12-20-2008 02:06 PM


All times are GMT -4. The time now is 05:24 PM.


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