View Full Version : [Store plugin] Polish ebook store - nexto.pl


t3d
05-10-2011, 08:46 PM
Hello!

Here is my plugin that allows browsing and searching Polish ebook store - nexto.pl

This is a draft, and some things will be improved during next few days (i.e. cover support, DRM status icon and so on).

Feel free to comment either here, or on polish forum: http://forum.eksiazki.org/calibre-f164/plugin-nexto-do-calibre-t9902.html

t3d
05-11-2011, 07:10 PM
I fixed some of the issues (cover, DRM icon) in version 1.0.1
You can find it attached to this post.

user_none
05-11-2011, 09:16 PM
Let me know if (or when) you want me to review it for you and give you some feedback.

t3d
05-12-2011, 05:58 AM
I did the review myself, removed obsolete code and fixed 3 additional issues (2 related to opening detail page and one with obsolete file included in zip archive), and now you can take a look :D

I know that my code is far from optimized (lack of experience makes me use re all the time :P), but the biggest problem is getting the author variable filled. The store's results page doesn't contain authors of listed ebooks (weird, isn't it?), so probably I will have to open another browser object and take the author from detail page, but that will be a huuuge performance hit. Any ideas?

user_none
05-12-2011, 08:38 AM
Use urllib.quote_plus instead of urllib2.quote. The Nexto site uses + for spaces. The quote style (quote vs quote_plus) is going to be store dependent.

With the search results you really want to have the author and title be in the initial SearchResult object returned by the search function. Unfortunately, in this case you will need to use a second browser to accomplish this. See the Baen Webscription plugin for an example. I realize this will slow down the results but author and title are both very important. So much so that they are required to be retuned by the search function for all calibre bundled stores.

Other information such as DRM, cover... can be retrieved dynamically later by implementing the get_details function. See the Amazon plugin for an example. However, you have no need for get_details as you're already able to get everything in the search function. Aside from author which really should not be handled by get_details.

get_details is called sometime after the SearchResult is handed back to the search window and it is displaying the result. get_details is used to dynamically load more information about a result.

t3d
05-12-2011, 04:32 PM
:thanks:

Thank you for your tips. The final version is attached below :)

Edit: I made one more change, i.e. "Nexto Store" was truncated to "Nexto".
The attachment was swapped :)

t3d
05-14-2011, 06:26 PM
I've found one more issue, that was just fixed. Some non-ASCII chars in query were not working. Release 1.0.4 is here :)

user_none
05-15-2011, 09:12 PM
Nexto plugin slated for inclusion in calibre 0.8.2. Installing the plugin located here will be unnecessary for any version >= 0.8.2.