View Single Post
Old 02-01-2011, 08:56 PM   #19
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
Quote:
Originally Posted by nickdma View Post
I had assumed that any preferences for the plugin, such as userid for GoodReads, would be stored locally, and not in the calibre database. At least in my case (though I can see other's sharing calibre on a single PC), each user has their own calibre install. We just happen to use the same database.
In your particular case that will work fine. But there are plenty of users out there who do not have individual windows accounts but still share a PC. So I will implement it as if the latter is the case and that will allow for both cases. If you define multiple users in the plugin configuration dialog, you will get a second level menu below the action e.g. Goodreads -> Add to shelf->User: Grant->to-read whereas if you only have a single user defined that "User: xxx" level menu is not required.
Quote:
All points which have so far kept me from "releasing" my script. I'm not opposed to sharing, but it's hardly shrink wrap software. It's got many hardcoded settings, such as the calibre custom table name, and users and such.

My particular use case probably isn't all too common I would think. I would think the most common use case would be to simply sync a custom read column with GoodReads. But then, it's just as easy to mark it as read per your normal calibre workflow, and then use the plugin you're creating to "export" that to GoodReads. In my case, I had need to obtain "read" data for others. If it was just myself, a custom column would have been adequate.
True, I happen to mark my books with a tag to indicate they have been read rather than a custom column. And I'm sure I'm not the only one, so again supporting both cases would be required.

The question of "syncing" of course raises the issue of "who is the master". If I select a bunch of books and add to a shelf in Goodreads, that implies Goodreads is the master (as I am not removing books from my Goodreads shelf that were not in my selection).

If I were to add an "Update from shelf" menu option at some point (allowing a book to be tagged or a custom column populated as discussed), what do we do about Calibre books that were tagged from a previous update but are no longer on that shelf? In the case of the "read" shelf this is hopefully less likely to happen. However if you chose to synchronise the "currently-reading" shelf, this could happen a lot. Should we leave it up to users to manually remove such tags in Calibre not now in the Goodreads list? Or do we instead call the option "Sync with shelf", choose Goodreads to be the master and automatically update other Calibre books no longer on the shelf by removing the tag value?
Quote:
So far, I've found going from calibre to GoodReads pretty easy and reliable. I haven't done exhaustive testing, but I've yet to lookup an ISBN on GR and not find it. I would think if you ask GR for a book ID by ISBN (if available in calibre) you'll get a hit quite often. If no hit by ISBN, then a title/author should hit. The GR search engine seems to do a good job of sorting out quirky title/author mashups.
Good to know. I'm thinking about having a dialog displaying the results of an add operation - listing books in order of those not able to be synced (e.g. no ISBN or no match in Goodreads), those that were added and those that were on the list already (as I think I will add a call to get the list of books on a shelf before doing an add - no point in calling add 15 times if 14 were already on the shelf). From this dialog you will ultimately be able to do actions to fix the problem, such as with a right-click try to find an ISBN and then try again.

If I ever implement the "Update from shelf" or "Sync from shelf" option it could similarly be used to resolve mismatches in ISBN values to again retry as required without having to try to note down the offending books, manually fix up and start over.
Quote:
You remove a book from a shelf with:
http://www.goodreads.com/shelf/add_t...ove&book_id=id
I don't see much need for the plugin to remove a book, sending them to their shelves is probably sufficient. One could argue that not allowing removal of books is best, since it prevents mishaps with a users shelves.
Ahh, nice to know if not exactly intuitive I had only scanned the top level API names at this point and didn't spot a remove option. I think I will still have the remove option in there, I'll just throw a warning dialog up before it to remind the user of the risks if they got it wrong.
kiwidude is offline   Reply With Quote