Hi All,
Based on the discussion here and in the FolderIn/FolderOut thread, I have just committed to master support for two new plugin features available in edit, output, and validation plugins:
Code:
bk.get_epub_is_modified()
returns boolean True if the epub inside Sigil has been modified
but not yet saved to disk
bk.get_epub_filepath()
returns a string of the filepath for the epub currently open in Sigil
or the null string "" if the current epub is unsaved/untitled
Here is snippet of code you can add to your current plugin.py to test these features available in any build of Sigil from current master
Code:
# status of epub inside Sigil and its current path
if bk.launcher_version() >= 20180122:
print("\nExercising: get_epub_is_modified and get_epub_filepath")
print("epub inside Sigil is Modified: ", bk.get_epub_is_modified())
print("filepath of epub open inside Sigil: ", bk.get_epub_filepath())
These new features will appear in the next release of Sigil.