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-29-2010, 08:04 AM   #16
GrzegorzN
Junior Member
GrzegorzN began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Aug 2010
Device: Kindle 3
Uhm... Hi all,
this is my first post here, and this is probably the best discussion for me to join in.

I'm currently using Calibre (great tool, thanks!) to organize my personal ebook library, and I started hacking together non-standard Amazon metadata/cover download plugins, because:

a) I want the Amazon plugin to fall back to author/title search if the ISBN isn't filled in.

b) I want to download cover images primarily from Amazon. I find it to be one of the best sources of covers for my needs.

c) I wanted to be able to search in multiple languages, or at least switch the result language. I don't need it _that_ badly, but I have ebooks in 3 languages, and 2 of them (de, en) are directly supported by Amazon, so why not use it?

d) I want the Amazon plugin to use my Amazon key/secret, like I use my isbndb.com key for the isbndb plugin. The downside is that to use the plugin you'd need to get your (free) API key from Amazon, but I think it's still better than sending all your ISBNs to http://status.calibre-ebook.com/aws/metadata/<ISBN> (single point of failure, load, maybe privacy issues...)

e) I want to learn more about how Calibre works, because I'd like to start contributing at some point.

There are bits I haven't quite figured out yet, maybe someone could help out here/point me in the right direction?

1) I tried defining my cover and metadata download plugin classes in the same script, but Calibre seems to be picking up only the metadata download plugin. Is it even possible to have more than one plugin per *plugin.py file?

2) Can Calibre handle a plugin class with multiple responsibilities,
like 'class UnifiedAmazonPlugin(MetadataSource, CoverDownload):'? (the amazon API is practically begging to do it this way).

3) I'd like my plugin(s) to have 3 configuration properties: amazon id, amazon secret, and the result language(s). For my first plugin attempts I'd like to see two text entry fields and a combo box (for the result language) when I click "Customize plugin". Or maybe not a combo box, maybe a row of checkboxes (gb, us, de, fr, ja, ...).
I see some customization-related methods in the plugin API, but I'm not sure if it's the 'customization' I'm looking for? And I don't see how I can control the customization GUI from the plugin code (although I see that the isbndb plugin somehow creates a text entry field).

Thanks!
GrzegorzN is offline   Reply With Quote
Old 08-29-2010, 08:50 AM   #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: 26,155
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) No
2) No
3) This is explained in the API docs of the Plugin class

And you have privacy concerns sending isbns to calibre-ebook.com but not to amazon? Seriously?
kovidgoyal is online now   Reply With Quote
 
Enthusiast
Old 08-29-2010, 12:25 PM   #18
GrzegorzN
Junior Member
GrzegorzN began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Aug 2010
Device: Kindle 3
1) and 2) -- would you accept patches that enhance this aspect of plugin handling?

3) Thanks. I think I couldn't figure it out because I was testing it with my MetadataSource subclass, and for some reason defining it there has no apparent effect. I always see 3 checkboxes with 'download ratings/descriptions/tags', even if I don't define my own customize_help() (a bug?)

But when I tried it with a CoverDownload plugin, it all became clear -- worked as advertised A shame that the customization is restricted to a single string... It would be great if it used some map-based approach, but I can work around that (I suppose I can use comma-separated key-value pairs to get more than one logical value through. Not very userfriendly, but will do the job).

Also, it seems that the zip of my CoverDownload plugin doesn't get added to the list of imports when the plugin is invoked (I get exceptions when I try to import modules bundled with the plugin, this forced me to temporarily do sys.path.insert(0, self.plugin_path) in the plugin itself). Normally I'd assume that I'm doing something wrong, but my MetadataSource plugin uses the same imports and works just fine...

Oh, and as for privacy issues -- I don't really have any, so please don't take it as personal mistrust, but if I can have the functionality of your proxy built directly into the plugin, then I'll go for it.

But as I said, it makes sense for me to decouple it this way, because then I can do any query type I need (inc. non-en languages, search by author/title,...), you won't be bothered with the load of handling Amazon queries for all your users out there...

Oh, and I can be sure that, should your proxy (or a router along the way) go down or become slow for some reason, that plugin will not be affected. It's a win-win, I think?

Last edited by GrzegorzN; 08-29-2010 at 12:27 PM.
GrzegorzN is offline   Reply With Quote
Old 08-29-2010, 01:23 PM   #19
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: 26,155
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
1) Sure.

2) Simply disable the other cover download sources

The plugin is not going to become API key dependent. I am not going to force calibre users to get an api key from amazon to use the plugin.
kovidgoyal is online now   Reply With Quote
Old 08-29-2010, 01:24 PM   #20
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: 26,155
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Oh and I forgot to mention that you can so arbitrary customization of plugins. The string based customization is just for convenience. Look at the device plugins for an example.
kovidgoyal is online now   Reply With Quote
Old 08-29-2010, 04:27 PM   #21
GrzegorzN
Junior Member
GrzegorzN began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Aug 2010
Device: Kindle 3
Actually, I had a look to figure out why MetadataSource is ignoring customization_help() -- it implements it's own config_widget(), config_store() etc., disabling customization_help(). Cool, the config_widget() approach might be just what I need for my plugin.

As for not forcing users to get a key of their own -- there are definitely users who will appreciate that hassle-free setup, and I'm very far from suggesting you take that away from them. For me keys aren't that important (e.g. I signed up with isbndb only to get a key for your isbndb plugin), but other people might feel otherwise.

Still, that shouldn't be an issue -- plugins can be easily swapped. For what it's worth, I think Calibre should always ship with your "easy" plugin enabled by default, and I can just add my plugins on top of that. At some point it might even be possible to push them into the main tree (disabled by default)? I think the real issue ATM would be the quality of my code, not what I'd like the plugin to do...
GrzegorzN is offline   Reply With Quote
Old 08-29-2010, 05:05 PM   #22
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: 26,155
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Ideally, I'd like to see the functionality common to both plugins (I can modify the proxy to do what's needed) and have an option to allow users to input an API key, in which case the plugin would bypass the proxy.

As for quality, don't worry too much about it, implement something and submit a patch, I'll help you get it in shape.
kovidgoyal is online now   Reply With Quote
Old 09-10-2010, 06:57 AM   #23
_noel_
Member
_noel_ began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Mar 2010
Location: Bavaria / Germany
Device: iPad 4 32GB
@kovidgoyal: german covers & descriptions

Quote:
Originally Posted by kovidgoyal View Post
Open a ticket for it, so I don't forget
Hello Kovidgoyal,

I'm using Calibre since a few days for managing a huge german PDF ebook collection.
I've also found the problem, that Calibre mostly collects english tags and covers.
Is there a chance to switch from "amazon.com" to "amazon.de" somehow?
I would be a pleasure for me to test any alpha/beta Calibre versions for this feature. I'm familiar in programming since about 30 years with a lot of programming languages, can I do some prototyping for this ?
One additional questions: I'm looking primarily for german abstracts and blurbs for my PDF ebooks, which webservice does provide such summaries best? amazon, google books, bol ?

thanks & regards
Eberhard

PS: Calibre is a GREAT pice of software
_noel_ is offline   Reply With Quote
Old 09-10-2010, 10:56 AM   #24
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: 26,155
Karma: 5381911
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
A couple of people in this thread have indicated they are developing german versions of the amazon plugin. If you want to try as well, you are welcome to. INstructions for running calibre from source are in the User Manual. Feel free to ask if you have questions.
kovidgoyal is online now   Reply With Quote
Old 09-10-2010, 11:25 AM   #25
_noel_
Member
_noel_ began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Mar 2010
Location: Bavaria / Germany
Device: iPad 4 32GB
Quote:
Originally Posted by kovidgoyal View Post
A couple of people in this thread have indicated they are developing german versions of the amazon plugin. If you want to try as well, you are welcome to. INstructions for running calibre from source are in the User Manual. Feel free to ask if you have questions.
I'll try it this weekend ...
_noel_ is offline   Reply With Quote
Old 09-11-2010, 08:48 AM   #26
GrzegorzN
Junior Member
GrzegorzN began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Aug 2010
Device: Kindle 3
Oh, for what it's worth -- here are my hacky Amazon plugins (they work for me, mostly, and if anything they're a starting point well outside of Calibre's internals...). Haven't had time to polish them since my initial posts here, but feel free to take a look.

Amazon Book Covers.zip

Amazon Book Details.zip

You should probably disable the original amazon plugin if you intend to test them. They won't collide, but there's probably no sense in querying the same source twice.

When you customize the plugins you'll need to enter an Amazon API ID/key and secret (sign up here), and then select the language domains that you want to use from the list (and arrange them by dragging -- they should then be queried in order, from top to bottom). Haven't really tested that part though

Those plugins work slightly different from the original Amazon one, in that they use author/title data for queries if ISBN is blank, so you can actually get multiple results from Amazon.

A shame Calibre's cover download feature doesn't present you with a list of results so that you can choose the cover you like (like it does for other metadata), because at the moment it's a bit of a lottery -- I believe you get the first match, which might not be what you like... I wish I had more time to see if it's something simple enough for me to add.

Last edited by GrzegorzN; 09-11-2010 at 08:52 AM.
GrzegorzN is offline   Reply With Quote
Old 09-11-2010, 11:47 AM   #27
_noel_
Member
_noel_ began at the beginning.
 
Posts: 11
Karma: 10
Join Date: Mar 2010
Location: Bavaria / Germany
Device: iPad 4 32GB
Quote:
Originally Posted by GrzegorzN View Post
Oh, for what it's worth -- here are my hacky Amazon plugins (they work for me, mostly, and if anything they're a starting point well outside of Calibre's internals...). Haven't had time to polish them since my initial posts here, but feel free to take a look.
Thanks a lot for sharing
This is a good starting point, it works much better now !

Kind regards
Eberhard
_noel_ is offline   Reply With Quote
Old 09-12-2010, 03:44 AM   #28
plunderydoo
Enthusiast
plunderydoo has a complete set of Star Wars action figures.plunderydoo has a complete set of Star Wars action figures.plunderydoo has a complete set of Star Wars action figures.plunderydoo has a complete set of Star Wars action figures.plunderydoo has a complete set of Star Wars action figures.
 
Posts: 38
Karma: 412
Join Date: Sep 2009
Device: WinMobile, Hanvon N516 w. OpenInkPot, eLyricon EBX-500, Iphone 3GS
plugins are working good.
Thanks a lot !!

plunderydoo is offline   Reply With Quote
Old 09-19-2010, 06:41 AM   #29
ichbindasauge
Connoisseur
ichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austenichbindasauge has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 70
Karma: 23456
Join Date: Oct 2009
Device: Kindle 2 US, iPad, Samsung Win 8 Tablet
Should I be able to get all books that are available on amazon.de, if I activate this plugin and put de on the top of the list? For some it doesn't work. I also don't get the descriptions that amazon.de has on their website.
ichbindasauge is offline   Reply With Quote
Old 10-01-2010, 11:22 AM   #30
LeseDidi
Junior Member
LeseDidi began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Oct 2010
Device: iphone 3GS, iPad, Pocketbook 360
Thanks a lot.

But unfortunately I have the same problem as ichbindasauge. Sometimes/often the Book is identified correctly but the description which is available on amazon.de is not shown. An it is such a pain to copy all this stuff by hand ...

Here is an example:
calibe 0.7.17
original amazon-plugin deactivated
GrzegorzN plugin activated, credentials filled out, only .de selected

Title: Pakt der Hexen
Author: Kelley Armstrong

Two versions are found with the following ISBN-numbers:
342663807X
9783426638071

If I search amazon.de manually for either of those, nice descriptions are availble but none is shown within calibre.

Any ideas? Please, any advice is highly welcome.

Best regards
Didi


Quote:
Originally Posted by GrzegorzN View Post
Oh, for what it's worth -- here are my hacky Amazon plugins (they work for me, mostly, and if anything they're a starting point well outside of Calibre's internals...). Haven't had time to polish them since my initial posts here, but feel free to take a look.
.....
LeseDidi 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
Would it be possible for Amazon to re-compile Amazon Reader App for Pocketbook OS dev brecklundin PocketBook 3 09-22-2010 08:04 PM
Adding book descriptions to kindle buzzandfuzz Calibre 0 06-14-2010 04:19 PM
Article descriptions in MOBI fcadete Calibre 5 04-10-2010 08:51 AM
Viewing descriptions of Books on PRS 505 nixxy246 Sony Reader 2 08-13-2009 06:55 PM


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


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