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

Go Back   MobileRead Forums > E-Book Software > Calibre > Library Management

Notices

Reply
 
Thread Tools Search this Thread
Old 07-02-2017, 10:16 PM   #16
davidfor
Grand Sorcerer
davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.davidfor ought to be getting tired of karma fortunes by now.
 
Posts: 14,501
Karma: 24607224
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo: Touch, Glo, Aura H2O, Glo HD, Aura ONE
Quote:
Originally Posted by jeffls View Post
Ah, that makes perfect sense.
I've been looking through the docs and code available for plugins, but haven't figured out yet how do a simple one that would take the book selection and execute my python code that utilizes my amazon api login information. It's tough looking through all the plugins to find one that's a good starting point.
I can't really think of a good starting point either. Goodreads Sync uses the Goodreads API and does some changes to the tags, but it does so many other things it can be confusing to find code. But, you should be able to create a metadata source plugin that does it. They aren't limited to scraping web sites. The Fantastic Fiction metadata source plugin uses their API for some of the function. And doing it this way has the big advantage of not having to worry about an UI.

The book selection side of it is easy, and most of the plugins start that way. Again, I'm not sure which to suggest as a starting point, but if you have a look at any of the plugins I'm maintaining, I'll be happy to answer any questions.
davidfor is online now   Reply With Quote
Advert
Old 07-02-2017, 10:41 PM   #17
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: 32,886
Karma: 10034422
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Metadata source plugins have a pretty trivial API. Basically you just need to implement a single method, the identify() method. And optionally the download_cover() method. Just look at any metadata download plugin for examples.
kovidgoyal is offline   Reply With Quote
Old 07-03-2017, 12:47 AM   #18
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,546
Karma: 9014314
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo Glo, Kobo H2O, Kindle Touch
One bit of metadata I wish I could automatically fetch from Amazon is the page count, if defined. I'd love to be able to tack that on at the end of the description.
Rev. Bob is offline   Reply With Quote
Old 07-03-2017, 06:29 AM   #19
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 21,665
Karma: 20975546
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab 2(RIP)
Quote:
Originally Posted by Rev. Bob View Post
One bit of metadata I wish I could automatically fetch from Amazon is the page count, if defined. I'd love to be able to tack that on at the end of the description.
Amazon owns Goodreads. The Count Pages PI can use Goodreads
theducks is offline   Reply With Quote
Old 07-03-2017, 01:14 PM   #20
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,546
Karma: 9014314
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo Glo, Kobo H2O, Kindle Touch
Quote:
Originally Posted by theducks View Post
Amazon owns Goodreads. The Count Pages PI can use Goodreads
Amazon does not reliably populate page-count data to Goodreads; its ownership of the site is irrelevant. Furthermore, Goodreads has a host of librarians with access to edit (theoretically fixing) GR book data on a whim; those changes don't propagate back to Amazon.

Thus, saying "use Goodreads as a source for this Amazon data" is unreliable at best.
Rev. Bob is offline   Reply With Quote
Advert
Old 07-07-2017, 03:54 PM   #21
jeffls
Junior Member
jeffls began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2017
Device: android
Quote:
Originally Posted by kovidgoyal View Post
Metadata source plugins have a pretty trivial API. Basically you just need to implement a single method, the identify() method. And optionally the download_cover() method. Just look at any metadata download plugin for examples.
I've looked at several and still having a problem. I can actually get my code to use the amazon api and obtain the fields I want, but it's not clear what magic gets these back into the calibre database.

Most all of the example code uses the worker capabilities, and I'm have a serious issue getting calibre-customize to import from any module file I create. For example:
1. I have two files: "__init__.py" and "worker.py"

2. worker.py has a class named "Worker"

3. My class in __init__.py has the following line:

name = 'Amazon Genre Tags'

4. in my init.py file I try: (note: my plugin is named 'Amazon Genre Tags')

from calibre_plugins.amazon_genre_tags.worker import Worker

Result: The calibre-customize -b command will always file with the following error:

ImportError: No module named amazon_genre_tags.worker

It's there, I can't figure out what the problem is. I'm probably too dense to learn strictly from examples and need more direct step-by-step instructions.
jeffls is offline   Reply With Quote
Old 07-07-2017, 04:11 PM   #22
jhowell
Wizard
jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.jhowell ought to be getting tired of karma fortunes by now.
 
jhowell's Avatar
 
Posts: 2,155
Karma: 22016394
Join Date: Nov 2011
Location: Florida
Device: Oasis 2, Fire, iPad Air 2, Nexus 7
Quote:
Originally Posted by jeffls View Post
ImportError: No module named amazon_genre_tags.worker
Perhaps you are missing the plugin-import-name file. See the plugin documentation.
jhowell is offline   Reply With Quote
Old 07-07-2017, 04:34 PM   #23
jeffls
Junior Member
jeffls began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2017
Device: android
Quote:
Originally Posted by jhowell View Post
Perhaps you are missing the plugin-import-name file. See the plugin documentation.
THANK YOU!!! When switching from single __init__.py file I forgot I needed to add this file.
jeffls is offline   Reply With Quote
Reply

Tags
download, metadata, tags

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get Metadata from Amazon Ginnia Calibre 37 02-20-2012 10:11 AM
Amazon metadata: Just me or down for everyone? CWatkinsNash Calibre 7 02-03-2012 10:05 PM
unable to change Amazon source for metadata to amazon UK callwing Library Management 0 09-09-2011 10:41 AM
metadata from amazon errors kevinrs Calibre 1 05-09-2011 11:09 AM
Amazon metadata and covers? desertgrandma Devices 13 02-19-2011 07:28 PM


All times are GMT -4. The time now is 06:54 AM.


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