Thanks for this. I've tried your suggestions and have been able to run the plugin as standalone and from the calibre GUI - with a working QWebEngineView widget.
After thinking about it some more I can see that there is an advantage to the standalone not needing to have a local copy of scrambleebook.py and the images directory. A simple .bat should be OK
Code:
echo off
calibre-debug --run-plugin ScrambleEbook %1
A few questions though ...
In the plugin's uiaction.py to start the dialog it used to have
Code:
dlg = EbookScramble(path_to_ebook, book_id=book_id, from_calibre=True, parent=self.gui)
dlg.exec_()
and now I think you're suggesting it runs itself from itself?
Code:
from calibre.debug import run_calibre_debug
run_calibre_debug('--run-plugin', 'ScrambleEbook', path_to_ebook)
I'm not sure yet whether the book_id arg is still needed because the path_to_book has already been set at this point, but I do still want the
from_calibre parameter set to
True when run from calibre GUI. Where do I put this?
I thought this might work but it doesn't.
Code:
run_calibre_debug('--run-plugin', 'ScrambleEbook', path_to_ebook, 'True')