Quote:
Originally Posted by Toxaris
Perhaps a side effect from the update checker?
|
The update checker code segment is only executed once the plugin runs. I.e. it has nothing to do with Sigil itself. However, if a plugin corrupts/deletes its own plugin.xml file, it might no longer be listed.
The ePubCheck plugin checks its version number using
xml.etree.ElementTree, but doesn't write to plugin.xml. I.e., it shouldn't have the capability to modify its plugin.xml file.
@KevinH & DiapDealer: Could you please do a "mini code review" of the following version checking segment?
Code:
import xml.etree.ElementTree as ET
# run plugin version check
plugin_xml_path = os.path.abspath(os.path.join(bk._w.plugin_dir, 'EpubCheck', 'plugin.xml'))
plugin_version = ET.parse(plugin_xml_path).find('.//version').text
This is the only code that accesses plugin.xml and the ElementTree information isn't used elsewhere in the plugin.
In addition to the version check code I also added the following line to plugin.xml:
Code:
<autostart>true</autostart>
However, this line should be ignored by Sigil 0.9.2 and older versions.