View Single Post
Old 02-11-2012, 10:07 AM   #200
kiwidude
Calibre Plugins Developer
kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.kiwidude ought to be getting tired of karma fortunes by now.
 
Posts: 4,733
Karma: 2197770
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
v1.3 Beta

This beta adds an option to download the actual page count for a book edition from the Goodreads website, rather than only being able to estimate it based on ePub/Mobi content.

Kovid accepted a change I made last night to calibre which will allow the APNX file produced when sending a book to your device to pull the page number from a custom column rather than always calculating it.

So the combination of the two now means it is possible to automate the retrieval of page count for a book with this plugin, and have that displayed on your Kindle with the next calibre release of 0.8.40.

Note that I have made an intentional limitation with this functionality - you can only download the page count for a book that has a goodreads identifier. How do you get a goodreads identifier? Either by using the Goodreads metadata download plugin, or by using the Goodreads Sync plugin (or manually typing it into the ids field on Edit Metadata). If the edition you are linked to has no page count, then you will need to link to a different edition.

Why this limitation? Without it, the plugin would have to search the website to find a match based on ISBN/Title/Author just like metadata download. Which means a whole bunch of replicated code I can't be bothered with, and a lack of control over which edition gets selected (it could match the wrong book), whereas at least with single metadata download the user has a UI to choose. This simplified the implementation, which means I get to spend more of my weekend relaxing

There is no intention of adding similar Amazon website support at this point, since historically Goodreads data has been a superset of Amazon anyways. There are also the complications of multiple regions, possible current website changes etc.

I agonised over how best to integrate this download option into the UI, and a separate menu option was my decision. You can configure the default action for just clicking on the button (the plugin had no menu previously) so users who don't want the new functionality will find nothing needs to change. I contemplated whether to "fallback" to using an estimation for page count when none found via Goodreads, but decided against it - at least this way if you get no page count you more obviously know the cause is a bad goodreads id linked and can either rectify it or compute it.

Any feedback appreciated before I officially release it.
Attached Thumbnails
Click image for larger version

Name:	Screenshot_1_Toolbar.png
Views:	329
Size:	8.7 KB
ID:	82435   Click image for larger version

Name:	Screenshot_2_Configuration.png
Views:	411
Size:	18.0 KB
ID:	82436  

Last edited by kiwidude; 02-12-2012 at 02:07 PM. Reason: Removed attachment as officially released
kiwidude is offline   Reply With Quote