Quote:
Originally Posted by kovidgoyal
In The plugin you have a separate ui.py. All is needs to do is run
Code:
self.gui.job_manager.launch_gui_app('webengine-dialog', {'module': 'calibre_plugins_your_plugin_import_name.main', 'path': path_to_book})
Then in the main.py file have a function named
Code:
def main(path_to_book):
this can run the actual plugin with the webengine based UI
|
It's working, let joy be unconfined!
I decided to use a hybrid solution which uses eschwartz's cli method if running standalone and your new 3.99.4 method when running from the calibre GUI.
I'd like to clarify something about the latter.
In the show_dialog called by genesis() I have
Code:
self.gui.job_manager.launch_gui_app('webengine-dialog',
kwargs={
'module':'calibre_plugins.scrambleebook_plugin.main',
'path_to_ebook':path_to_ebook,
'book_id':book_id,
'from_calibre':True
}
)
and a separate main.py file in the plugin containing only a single function
Code:
def main(path_to_ebook, book_id, from_calibre)
Are the
2 red names constant or can you choose your own. I'm assuming they are constant?