View Single Post
Old 08-23-2020, 10:43 AM   #468
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,893
Karma: 6120478
Join Date: Nov 2009
Device: many
Sounds interesting! For larger projects, I typically unzip an epub into a "root" folder inside a new project folder, then copy all the plugin code itself and add the very minimum python code to invoke the launcher.py script properly.

For small projects, I just change the plugin.py final "return 0" with "return -1" so that a full debug log is always created and nothing will ever get changed in Sigil by my plugin, then add a bunch of print statements, fire up Sigil and can launch my plugin again and again tweaking the plugin code as needed inside where it gets unpacked to in the Sigil Prefs folder. There is no need to delete or reinstall the plugin itself, and no need to even relaunch Sigil. Just a quick edit, run cycle.


I can easily see that a more rigorous test set-up outside Sigil itself might be valuable. The entire plugin interface is meant to be launched in a subprocess from within Sigil via the command line so it can be isolated away from Sigil. Just passing in the correct inputs and config file, setting paths, etc should be enough given an appropriate python3 setup is available.
.

Thanks!
KevinH is offline   Reply With Quote