View Single Post
Old 03-27-2011, 07:58 PM   #1
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,866
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
calibre's new plugin API

This is for plugin developers,

I just finished developing a new API for calibre plugins that makes coding plugins a lot easier/cleaner. The new API is backward compatible, i.e. old plugins should continue to work. It also fixes a bug where some users on windows with non ASCII paths were unable to load plugins, however for this fix to work for your plugin, you have to move it to use the new API.

Major features:

1. You can seamlessly import python code from different python files inside your plugin zip file using pythons normal import syntax, no more mucking around with zip import
2. A couple of new builtin functions that allow you to easy load images/data files from your plugin zip file
3. Point 1. means you no longer need the complicated structure of proxy classes in your InterfaceAction plugins


I also wrote a nice tutorial with sample plugins illustrating the techniques, available here: http://calibre-ebook.com/user_manual...g_plugins.html

Note that the example plugins have their minimum_calibre_version set to 0.7.53, so you either have to change the calibre version in your copy of the calibre source or wait for the next calibre release to actually run the plugins.

Let me know if you have any questions/concerns.

Last edited by kovidgoyal; 03-27-2011 at 08:04 PM.
kovidgoyal is offline   Reply With Quote