View Single Post
Old 03-01-2011, 03:24 AM   #10
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
I've had a few further thoughts on your suggestions. Firstly pulling rating information. I will hold off doing any kind of metadata updating until Kovid finishes his changes to that API. I don't know any details of what he has planned for it, but it is "possible" that he may allow for a more granular merging of data such that you could choose to get only the rating. What I do know for sure is that as he has a new identifiers table I can make use of I will be changing where this plugin currently stores the Goodreads Id so that both the Sync and the Metadata Download plugins can use it. As I mentioned on the other thread this will mean that when you do Ctrl+D the metadata download plugin can use the linked Goodreads Id to read metadata from the specific edition you have linked. So that would allow you to be sure you got just the right rating.

Sending a rating means creating or updating a review. That is something I may consider in future. For now you can just use the "View linked book" option and do it on the Goodreads website.

I've already removed the restriction on # shelves downloaded. I didn't have a limit of 100, I was just only downloading one "page" of your shelves. So it sounds like there are 100 shelves per "page". My change means I now download all "pages" if there are more than one. I have also added a "Display all" and "Display none" right-click menu options on the shelves list in the configuration dialog, to make it faster to decide which will appear on your menus. I hate to imagine what 120 shelves must look like as a submenu...

I will also add a "Create shelf" icon on that same dialog as someone else requested it as well.

As far as getting tags from shelves is concerned, it would be a little bit quirky. The only way via the API that I can get what shelves a book is on is via a call that gets all the books for a shelf. So this currently takes place when you choose to "Sync". What this means is that you won't be able to right-click on a book and say "Download tags from Goodreads" or whatever. Instead it would have to be an option that gets applied in the background as part of syncing from a shelf. While I do also read the books on a shelf when you add/remove I think it is less confusing if this tag updating would only take place for "sync" actions.

So lets say that you know all your books live on your status shelves of "read", "to-read" or "currently-reading" and perhaps another called "wishlist" or whatever. These are arguably the shelves you will most often sync from or update to from Calibre. To add tags for a Calibre book based on your Goodreads shelves, it will have to exist on one of those shelves listed (or whatever other shelves you are willing to sync from). If you have a book just on your "science-fiction" shelf and don't sync from that, you won't be able to get that as a tag for Calibre.

Now that makes it sound like a background action a bit like overwriting the ISBN is. So I think I would have a checkbox option on the configuration dialog of "Create Calibre tags for my shelves when syncing" with a button next to it popping up a dialog allowing you to modify the shelf->tag mappings as mentioned in my previous post. I will also add a "shelves" column to the sync dialog so you can see what of your shelves a book is on.

What this will mean is that every time you sync with that checkbox turned on your tags will potentially be added to for all of the books on that shelf. Tags are never duplicated, but if you had manually deleted a tag put there because you didn't want it in Calibre this action will keep putting it back until you either modify the shelves the book is on in Goodreads or edit your shelf/tag mappings. I don't really want to put the checkbox on the sync dialog itself - I think this is something you choose to commit to in entirety or not at all

The final implication of the above is that I only allow you to sync from a shelf which has at least one action setup for it. So say for instance you have a "to-read" shelf that has lots of your books on it that you want to get tags for. You will have to setup a sync action for that shelf to set some tag or custom column. If that sounds too limiting in that you cannot think of an action you would want for that shelf in Calibre, I could add a new dummy action type to that dropdown which currently says "Add value to column" and "Remove value from column".

Anyways, those are my thoughts. Given the constraints above about it only being able to update books that exist on a shelf you sync from etc is it still worth doing, or is it so unintuitive we bin the whole idea?
kiwidude is online now   Reply With Quote