Quick question:
Should it be okay for plugins to store things into the Sigil's Preferences folder at its root level or should it only write files to its own prefs folder?
I am designing a PrettyPrinter plugin for Sigil where users will need easy access to change/edit a css-lile file that controls how specific tags are handled when prettyprinting.
This prettyprinter.pcss (extention is short for pseudo css) of course uses braces "{" "}" everywhere (as these are selectors) making storing it inside a json file a bit of a pain that would also inhibit easy editing with any text editor.
I could of course write a gui editor for the plugin to directly edit that pcss file but I am really do not want to make this tool user interactive but instead be an auto-open auto-close plugin quick and silent tool that can reformat any number of selected xhtml files (just like an internal Sigil tool).
So my first thought was tp put the prettyprinter.pcss file at the root of the Sigil Preferences folder but now feel that it may be setting a dangerous precedent for plugins.
Should I just store this file in the plugins_prefs folder inside the plugin's folder?
It would be easy to do based on code I found in a number of existing plugins:
Code:
prefs_folder = os.path.join(os.path.dirname(bk._w.plugin_dir), "plugins_prefs", bk._w.plugin_name)
But would most users be able to find it?
Where should non-json files that the plugin user needs to easily access be stored?
Thoughts?