View Single Post
Old 11-28-2010, 08:20 AM   #1
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,228
Karma: 1334002
Join Date: Oct 2010
Location: London, UK
Device: Kindle Paperwhite 3G, iPad 3, iPad Air
Custom GUI plugins for Calibre here...

This thread is now closed and deprecated due to the creation of a plugins subforum. Each plugin now has it's own thread. You may find all plugins at the new Index of plugins sticky thread and installation instructions on the Introduction to plugins sticky thread.

This thread has been created for the “tinkerers” like me out there who have new features they would like to see appear in the Calibre context menus or toolbar. Traditionally new UI features could only be added by directly modifying the source and waiting for a patch to be accepted into a new version of Calibre. However as of Calibre 0.7.32 it is possible to create such new features as “interface plugins” in a zip file that users can download and install for themselves. I’ve written a couple that others may find useful and perhaps others out there have implementations or ideas for more they can add to this thread.

What is a Calibre UI plugin?
A plugin consists of a *plugin.zip file containing Python code that can be installed by the calibre UI to extend its functionality. Information on writing plugins for Calibre can be found in the user manual at this link. A "Hello World" example can be found on this post. In addition you could look at the code within the following example plugins.

How to install a Calibre interface plugin:
  1. Upgrade to the latest Calibre version, or at least to the minimum version of Calibre specified for each plugin.
  2. Download the zip file attachments in this thread attached to posts for the specific plugin(s) you like. Do NOT extract the zip file.
  3. In Calibre choose Preferences->Plugins. Click the “Add new plugin” button to browse to the location of your xxx_plugin.zip file and click Add. The plugin should now appear in the list of “User Interface Action plugins” above. Apply and close.
  4. IMPORTANT: Restart Calibre after installing a GUI plugin.
  5. IMPORTANT: By default a GUI plugin will not appear in any menus or toolbars. To add it to any of these you must go to Preferences->Customise the toolbar. In the dropdown at the top choose where you want the new action, such as “The context menu for the books in the Calibre library”. The new plugin menu option should be in the list of “Available actions” on the left for you to select it. Apply and close.
  6. Your plugin should now be available in the menu/toolbar as appropriate. Further customization options for each plugin are frequently available, at a minimum via the Preferences->Plugin dialog.

What if the plugin doesn't work?
  1. Any questions/issues concerning functionality of these plugins should be kept in this thread, I’m sure Kovid doesn’t want his bug tracker filled with issues concerning code he doesn’t support.
  2. Before you post, *please* double check you have followed *all* the instructions specified above and in the plugin post itself.
  3. If the plug-in is throwing silent errors while loading, you can obtain the error output details by starting Calibre from a command window using "calibre-debug -g" and include the error output with your post.

NOTE: I take no responsibility for the plugins so don't blame me should something go horribly wrong - I'm just sharing what has worked for me with others to use (or not) as they like...

Quick Index to Plugins within this thread:

Last edited by kiwidude; 01-27-2011 at 08:48 PM. Reason: Message about closed thread
kiwidude is offline