View Single Post
Old 03-08-2013, 04:51 AM   #14
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,853
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
I've added an interface to calibre-debug to make running plugins even easier. Define a

def cli_main(self, args):
...

method in your main plugin class in __init__.py. Then you can run the plugin from the command line with

calibre-debug --run-plugin "Plugin Name" -- --option1 file1 ...

This will call cli_main() in your plugin with the passed in arguments.

No need to unzip the plugin and run python files etc. Will be in next weeks release, you can test it now if you run calibre from source.
kovidgoyal is offline   Reply With Quote