Quote:
Originally Posted by steinarb
Unfortunately no command line interface. Perhaps it should have had?
That would have made it simpler.
|
They're optional but very handy sometimes.
https://manual.calibre-ebook.com/plu...lugin.cli_main
Quote:
Originally Posted by steinarb
I started with "calibre-debug main.py" and then working my way through the error messages (wrong imports and "print" without parantheses).
I was confused for a while when "calibre-debug main.py" started reporting errors in other .py files in the plugin and continued to report the errors even after I had fixed them.
But then I found that re-running "calibre-customize -b ." made the fixed code be picked up by main.py.
|
Yeah, if things import from calibre_plugins.<name>.config or something then it will try to load them via the plugin infra, not relative to the current unpacked directory.
But using python-modernize could help to do much of the grunt work of porting!
Quote:
Originally Posted by steinarb
And after I had fixed all errors the plugin reappeared in calibre.
It is so much easier to work with error messages instead of staring at code I haven't touched for 5 years to try to figure out what's going on...:-)
Thanks!
|
I don't know why calibre-debug -g isn't exposing error messages already... it does if __init__.py fails to load, or if you get interface buttons and clicking on them raises errors, it seems weird if something going wrong in between those points is causing errors to get eaten instead of logged.