View Single Post
Old 11-11-2010, 08:34 AM   #15
kiwidude
calibre/Sigil 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,230
Karma: 1345754
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Ahhh yes, did not know that, thanks Kovid.

Job done... loving it! A shame I have to run from source (would be nicer as a zip plugin) but that I was able to add this so easily is a tribute to the quality of the existing codebase - great job Kovid and whoever else wrote Calibre.

I've attached a screenshot for anyone interested in what I ended up with. The sub-menu options are currently defined in an array. You specify the name, icon and a url with tokens like {author}, {title} or {isbn} to be substituted by the plugin based on the selected row. You can also do empty rows for separators.

If there was any interest by others in this becoming a patch to add to the trunk whoever wants to do it is welcome to the code, let me know. It would be nice to make the array able to be specified via the tweaks file or some other configuration, so users can manipulate the menu with other websites etc. I've not written this to be "bulletproof" being a Python newbie but it does the job for me.
Attached Thumbnails
Click image for larger version

Name:	SearchTheInternetScreenshot.png
Views:	138
Size:	50.5 KB
ID:	60988  
kiwidude is offline   Reply With Quote