slowsmile,
While I wait for your updated sample .html file to use to test your actual plugin ...
As a secondary test, I took Doitsu's code and tweaked it to operate on every xhtml file in the epub and actually write it back out to Sigil.
So this is an edit plugin. I have attached it to this issue.
Please download and install it.
- Open an empty Sigil document
- Add an id="removeme" to any p tag in Section0001.xhtml
- Then invoke the "junk" edit plugin.
It will both print to the screen the modified xhtml without the id="removeme" on the p tag and will then update your copy in Sigil once you hit "Ok"
Please try this on your system with the bundled Python 3 interpreter enabled.
If this works, then there is no problem with sigil_bs4 when it comes to how you want to invoke it.
Please let us know the results of this test.
As for why it only works in an external Python, my guess is that your actual plugin has external requirements that are not being met in the internal version of python 3. For example, your actual plugin uses tidylib but does not include the actual shared library in the plugin. If it is needed, then it must be added so that the internal python interpreter can access it.
KevinH
Last edited by KevinH; 11-16-2016 at 05:10 PM.
|