View Single Post
Old 11-20-2014, 03:11 PM   #2
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 8,842
Karma: 6120478
Join Date: Nov 2009
Device: many
Pre-Release Versions of Sigil's Python Plugin Launcher Code

Pre-Release Versions for Plugin Developers

Because storing preferences can be important for a Plugin, DiapDealer has designed a new python launcher preferences class and integrated it right into the *container classes, so persistent preferences storage is easily available for all plugins.

These changes are new since the Sigil 0.8.2 release and they will appear in the next future version of Sigil.

To illustrate how to create and use these settings, DiapDealer has designed two simple plugins that clearly demonstrate how the interface should be used.

See the attached "PrefsExampleGroups_v0.0.2.zip" and "PrefsExampleSimple_v0.0.2.zip".

Important
In order to use this preferences interface, you will need to be using Sigil v0.8.3 or greater.

It's possible to update only the python plugin launcher files if you can't wait for Sigil 0.8.3. To facilitate that we have thrown together a launcher_updater python program that will try to automatically find your Sigil installation and properly copy in the python files. *NOTE: this is unnecessary if you have Sigil 0.8.3 or higher.* The instructions for updating the plugin launcher files are being left in the event that that future preview releases appear.

To run the launcher_updater: do the following:

1. download the zip file attached to this post, do not unzip it

2. In a terminal, cd to where this zip file is (again, do not unzip it) and run the following command: (and yes you are telling python to run a zip file!).

Note that on Linux you will probably need to run this command with "sudo" and on Windows you should open a command-prompt as Administrator

Code:
python launcher_updater_20141204.zip
Before using this updater, please verify that it matches the following md5sum:

/sbin/md5 launcher_updater_20141204.zip
MD5 (launcher_updater_20141204.zip) = 9a4a2fbc79aacc736f95d74cc4b9eea9

If you know how to manually install the new python launcher files, you can simply unzip the launcher_updater and look in the payload folder.

Note, these launcher files will only work with stock Sigil 0.8.2, NOT Sigil 0.8.1.

Note, this pre-release returns a launcher_version value of 20141204 versus the earlier version in Sigil 0.8.2

And as always the very latest version of the python launcher code used by Sigil can always be be found here:

https://github.com/Sigil-Ebook/Sigil...unchers/python
Attached Files
File Type: zip PrefsExampleGroups_v0.0.2.zip (2.0 KB, 2294 views)
File Type: zip PrefsExampleSimple_v0.0.2.zip (1.6 KB, 2372 views)

Last edited by KevinH; 11-20-2015 at 10:42 AM.
KevinH is offline   Reply With Quote