I couldn't find my earlier works but I have (re)created some script that can be used for experiments. In the attachment of this message is `fossil-leo.leo` file which contains one @button script. Before running this script one should provide that fossil executable is somewhere in the path. Fossil can be downloaded from fossil-scm.org
The script performs two different actions depending on the switch in its root node. The first action is to create a repository (if it doesn't exist), and then to put current content of the Leo outline in the repository. One should perform this action several times after making any changes in outline. Every time this script is executed new version is added (unless there are no changes). After you create several versions you can change the switch in the root of script so that script performs another action. The other action is to retrieve content of any given node at the given time. Before performing this action one should adjust the arguments of the function call ` fossil_cat_at_time` to reflect his/her own Leo document. Time should be after the first version, and the name of file should be existing gnx that has been already stored using the first action. Content of the given node is presented in the log pane named 'History'. If you put the gnx which didn't exist at the given time, script would produce an error. This is just for experimenting. Someone good with the Qt may find a better way to show versions and also to allow user to choose particular version. function fossil_timeline can be used to retrieve names of the last 20 versions, or with some tweaking any other list of versions. Every version has canonical name like hexadecimal literal and the time it was committed. This list can be parsed and displayed as a list, combo or scale widget where user can easily choose version. A gnx can be either a gnx of the current position or position that was selected when the widget was constructed. Together gnx and version name (SHA1 hash) can be used by function ` fossil_cat` to retrieve content of the node in specified version. If this should become a plugin than perhaps it could also check whether there is fossil on system path or not and if it is not installed to retrieve correct version for the platform and install it somewhere in Leo folder and all fossil commands should be adjusted to use the downloaded executable. HTH Vitalije -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.
fossil-leo.leo
Description: Binary data
