01-22-2011, 09:56 AM | #241 |
Enthusiast
Posts: 41
Karma: 12
Join Date: Oct 2010
Device: Tablet PC
|
Searching the forums, there appears to be some interest in the ability to track read/reading lists with GoodReads. There's also people who desire not to have any "social" integration with Calibre. It seems like a plugin would be a nice compromise.
Looking over the GoodReads api, they have a few basic URL's that can be called to add a book to a user's shelf. This seems like it would make it relatively easy to create a GUI plugin to attach to the context menu. Right-click -> send to GoodReads read shelf, send to GoodReads reading shelf, etc. Maybe kiwidude would consider forking a copy of the Search the Internet plugin into a GoodReads Add to Shelf plugin? I think the only added bits needed would be to register the app with GoodReads for an API key, and add the OAuth handling to login to user's accounts. It would almost even be a reasonable candidate to fold into Search the Internet. I know you can do this type of thing with custom columns in Calibre. My wife and kids all share a copy of my library though, so that doesn't work very well. I'm sure there are users who enjoy the social aspect of GoodReads as well, and would prefer to push things out that way rather than in Calibre. We generally select a number of books to send to our readers, so it would make sense to also do a "GoodReads -> Send to reading shelf" at the same time. Then, next time we plugin our readers to Calibre, we can select the books on device that we've read and do "GoodReads -> Send to read shelf". I'm sure others would come up with their own workflows. Any takers? I kinda know what needs to be done, it's the doing part that I'm lacking in Can't wait to see the new Search the Internet plugin. I've been going through cleaning up my library, and I can't imagine how I got by without it before. That and Open With have made this task much more efficient, huge thanks kiwidude!! |
01-22-2011, 05:35 PM | #242 |
Calibre Plugins Developer
Posts: 4,631
Karma: 2129912
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Interesting idea on the Goodreads integration. I will take a look into it later today.
|
01-22-2011, 09:31 PM | #243 |
Calibre Plugins Developer
Posts: 4,631
Karma: 2129912
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Ok, so I've had a brief read through the GoodReads API. To be honest, oauth looks to be a *pita* to work with. I'm sure Kovid can confirm this but I don't believe Calibre uses oauth anywhere already so no quick & easy Python code for me to copy from . Plus there is the filth of callback urls which implies having a website to callback to...
I've got a few other questions too that would probably need asking in their developer forum. For instance you have to apply for a developer key (fine), but then it says that they monitor requests and part of their t&c are that a developer key does not make more than one request per second. So how does that work with multiple users of an application such as Calibre without a centralised web server to route the requests through? I can't guarantee that no two Calibre users around the world wouldn't click at the same time! You don't need the developer key (just oauth) to submit data to their website like the adding a book to a shelve you mentioned - but you can't get the list of shelves a user has without it. I understand they don't want their API flooded but unless I am completely missing their point I don't see how you can have a very functional application? I'll take another look sometime when I get a chance or if someone else can help shed light on this to progress it. From what I have seen it wouldn't make sense to incorporate it into the 'Search the Internet' plugin as you suggested, it's functionality and implementation are way too different. So it would be a separate standalone plugin. There are some very cool things that you 'could' do with the API though, for the Calibre users who are GoodReads users too. So I can understand your desire for it... Last edited by kiwidude; 01-22-2011 at 09:34 PM. |
01-22-2011, 11:08 PM | #244 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Dec 2010
Device: Kindle
|
Second Try at Making "Open With" Work on a Mac
Quote:
from PyQt4.Qt import Qt When right-click on a book, my context menu shows "Open With" and, when this is moused over, "AZW (Kindle)." Invoking the option, however, gets me the following error message:owp_open_with_menus = [('AZW (Kindle)', 'AZW', '/MacintoshHD/Applications/Kindle.app', None, 'mspaint.png', Qt.AltModifier+Qt.Key_E)] OSError:[Errno 2] No such file or directory When you ask Mac to "copy" the error's details, this is what it tells you:ERROR: ERROR: Unhandled exception: <b>OSError</b>:[Errno 2] No such file or directory I kept thinking there was a problem with the path in my tweak, but, now, I think the problem is that the path in the script doesn't match what's on my machine. Here are the "python" paths I've found which seem to relate to what the script is trying to do:Traceback (most recent call last): File "<string>", line 120, in open_with File "<string>", line 131, in launch_app File "lib/python2.7/subprocess.py", line 672, in __init__ File "lib/python2.7/subprocess.py", line 1201, in _execute_child OSError: [Errno 2] No such file or directory /Applications/Python\ 2.7 It troubles me (mostly due to my ignorance, I'm sure) that I have a "Phython 2.7" sub-folder in my applications folder, but no "2.7" sub-folder in my /Library/Python folder./Library/Python/2.6 Anyway, is there anything that jumps out as you as being an easy fix to my problem? Thanks. |
|
01-22-2011, 11:42 PM | #245 | |
Enthusiast
Posts: 41
Karma: 12
Join Date: Oct 2010
Device: Tablet PC
|
Quote:
Once a user has granted access to your app, I think your app is allowed to make changes to their data until they revoke the app's access. The bit about the 1 request per second is odd though. That has to be there so they can deny access to abusive apps. I can't imagine they hold every app to such a low threshold. Any popular app is likely to hit with that frequency. Anyway, thanks for looking into it. Hopefully there's enough interest for someone to tackle it. If I was more fluent with python I'd give it a go, but my past attempts at doing much with python didn't go so well. The OAught stuff was definitely the sticky part though. GoodReads recommends using a library for the OAuth work. There's a python one here https://github.com/simplegeo/python-oauth2, which you may have already found. |
|
01-22-2011, 11:44 PM | #246 |
creator of calibre
Posts: 43,819
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
I had a look at the goodreads api a while back and like most web 2.0 vintage APIs it is designed for use only from other websites, and low traffic ones at that. One request per second is unworkable, even routing through a central server, calibre has too many users. I'm not criticizing GoodReads for that, they have their business model, it's just not usable from calibre.
And no, there is no OAuth code in calibre, I've never been able to make heads or tails of OAuth, something about OAuth and my brain just don't get along. |
01-23-2011, 02:04 AM | #247 |
Groupie
Posts: 168
Karma: 2584958
Join Date: Jan 2009
Location: Texas
Device: Kindle PW2
|
That's a shame on the goodreads part but it makes since why it probably won't work. Just the thought of having my books lists synched to Goodreads seemed too good to be true. Though I also would never want to see the social stuff integreated. Maybe eventually Goodreads will see this as an opportunity and make some changes on their end to allow this. Stranger things have happened!
Danny |
01-23-2011, 06:49 AM | #248 |
Connoisseur
Posts: 77
Karma: 12
Join Date: Jun 2010
Device: Kindle
|
This is an incredibly helpful plugin. I would like to see it come with a search for Library of Congress as well. Not sure how to do it.
|
01-23-2011, 07:56 AM | #249 | |
Wizard
Posts: 3,447
Karma: 10484861
Join Date: May 2006
Device: PocketBook 360, before it was Sony Reader, cassiopeia A-20
|
Quote:
I can't imagine going back to using Calibre without this plugin. Importing books is much more streamlined, and I can switch between several sets of Import Regular Expressions, and between "swap author names" or not. The only thing that doesn't work on my Linux version of Calibre is Key Shortcuts. But it is no big deal, because usually I have to go to menu anyway to see what are the current settings. |
|
01-23-2011, 09:59 AM | #250 | |
Enthusiast
Posts: 41
Karma: 12
Join Date: Oct 2010
Device: Tablet PC
|
Quote:
I also found this, a python example to add books to a shelf, complete with OAuth. http://www.goodreads.com/topic/show/...w-to-use-oauth It uses a library for OAuth, and I don't know if a library can be part of a GUI plugin, or if the library would have to be included with Calibre for a plugin to use it. Hopefully it could be included with just the plugin so Calibre wouldn't have to carry additional libraries others may not use. I didn't see any need for a web service to accept a callback URL. I think the plugin would require an additional menu entry (or a GUI) with a mechanism to send the user to the GoodReads site to login and approve plugin access. I think that's just a one time thing though, which is the nice part of OAuth, the user allows your app to access their data, and that's it, no login each use. Edit: I posted on their dev forum asking for clarification on the TOS. http://www.goodreads.com/topic/show/...rvice-question Last edited by nickdma; 01-23-2011 at 10:21 AM. |
|
01-23-2011, 11:30 AM | #251 |
creator of calibre
Posts: 43,819
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can certainly include a library inside a plugin.
|
01-23-2011, 04:55 PM | #252 |
Connoisseur
Posts: 77
Karma: 12
Join Date: Jun 2010
Device: Kindle
|
The one thing I would like to see is a way to use the internet search from the edit book window - so if downloading the metadata fails I can quickly click to search amazon or google.
|
01-23-2011, 08:50 PM | #253 | |
my parent's oops...
Posts: 463
Karma: 1477570
Join Date: Feb 2009
Device: Vx->Handera->Clie-> Axim->505->650->KPW/Aura ->iOS/L2
|
Quote:
https://www.mobileread.com/forums/sho...&postcount=235 |
|
01-24-2011, 02:43 AM | #254 |
Calibre Plugins Developer
Posts: 4,631
Karma: 2129912
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
I've included that LoC website in the list that will come with the plugin. To everyone waiting - I plan on posting the new version here tomorrow. I made a few more changes today and awaiting feedback from a few "testers" to make sure the last minute additions didn't break anything...
|
01-24-2011, 02:58 AM | #255 | |
Calibre Plugins Developer
Posts: 4,631
Karma: 2129912
Join Date: Oct 2010
Location: Australia
Device: Kindle Oasis
|
Quote:
If the T&C only apply to DevKey and not OAuth calls then we can probably get away with it for just your desired feature of adding to a shelf. We could just make the user specify the shelf name as part of the configuration preferences, rather than say giving them a popup dialog of "choosing a shelf" in response to the right-click. I don't think you could add too many other features to the plugin without DevKey support though, it was pretty integral to any kind of "read" query against GoodReads from the quick look I had. Look forward to any clarification you are able to glean on that throughput stuff and see what happens... |
|
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom external commands in the GUI | janvanmaar | Calibre | 18 | 11-28-2010 10:35 AM |
Calibre GUI behavior between machines | phenomshel | Calibre | 2 | 08-21-2010 06:28 PM |
Calibre 0.6.10 GUI crashes on startup | Wagenius | Calibre | 1 | 09-03-2009 01:53 AM |
--breadth-first option in calibre GUI | osmo79 | Calibre | 1 | 05-30-2009 11:45 AM |
Calibre GUI crash on convert | aapezzuto | Calibre | 1 | 08-02-2008 06:39 PM |