View Single Post
Old 02-04-2011, 09:54 PM   #21
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,636
Karma: 2162064
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
Ok, I've been working on this the last few days and here is what it looks like so far...

The initial release will focus just on pushing information into Goodreads (i.e. updating your shelves in Goodreads with books from Calibre). So here is the functionality implemented to date in the plugin:
Click image for larger version

Name:	screenshot_1_toolbar.png
Views:	365
Size:	16.9 KB
ID:	66084

When you first start after installing the plugin, the only option you will have in the menu is "Customize plugin", which will take you to this dialog, showing the result of a user being setup:
Click image for larger version

Name:	screenshot_2_customize.png
Views:	365
Size:	28.2 KB
ID:	66085

As you can see I am supporting the possiiblity of multiple Goodreads accounts for users sharing the same machine logon. The very first time you create a "user profile" for the plugin you just give it a name (to appear in submenus if you have multiple of them), click the Authorize button and confirm in the launched Goodreads web page as I described in an earlier post. At that point it will display a list of the shelves you can work with. In a future version this dialog could be expanded to support "actions" associated with each shelf for an "Update from Goodreads" menu option I have mentioned previously, like "add tag xxx" or "put value yyy in custom column yyy".

The add to/remove from shelf actions will attempt to do as few API calls as possible, reading the contents of the shelf and then only updating for books in your Calibre selection that it needs to. However one of the big problems mentioned previously is missing ISBNs (or total lack thereof for some books). At the moment, after the action I display this summary dialog:
Click image for larger version

Name:	screenshot_3_summary.png
Views:	360
Size:	67.3 KB
ID:	66086
Here you can see information on the results of the add or remove action. You also have the opportunity to update the ISBN value to do a retry with various right-clicks to help get the data you need.

However this is only part of the longer term approach. I think what I need to do is add a custom column to Calibre containing the "Goodreads Id" and populate it as the plugin works with your selected books. That way any books which genuinely do not have an ISBN can still be "matched" and not have to ask the user repeatedly. It will also over time reduce the number of API calls being made as at the moment for every ISBN I have to lookup the Goodreads Id before making another call to add to the shelf.

With that in place I should be able to have some additional functionality on that summary dialog such as using the Goodreads API to search for books matching title/author, display in a popup and allow you to choose.

The "View shelf" option just launches a web browser with the selected shelf displayed in Goodreads.

It is fully functional at the moment, but as I am about to commit surgery on it to investigate the custom column approach I'm not making it available to play with as yet. Thoughts/suggestions welcomed.
kiwidude is offline   Reply With Quote