About month ago I made a prototype of Leo as electron application. There is only basic functionality browsing tree and editing bodies. It doesn't load derived files nor it saves outline. However, I don't expect it to be too difficult to add read/save functions that I wrote earlier.
Here is simple demonstration
video
It is written in Clojurescript and theoretically it can run on any platform Linux, Windows, Mac. I can't test platforms other than Linux, but electron is said to be available for all these platforms.
It has only 400 lines of code and was written in 5 days. After writing this first part as a proof of concept I had to turn my attention to other duties and leave this code for some other (better) time. I didn't intend to show it yet, but since Edward asked there it is. As attachment to this post there is
leo.asar file. To run it you must have installed
electron binary. You can find it on their
site or directly from
releases. Run
electron executable providing path to
leo.asar file as argument and you should see window with the tree on the right and body on the left. In fact you have to click once in the empty tree box on the right side, to render tree for the first time.
It renders tree on a canvas and uses Codemirror javascript library for syntax colorizing.
Tree data is represented in an interesting data structure. I have made also an experimental python version and tested it a little comparing with Leo position. It has shown better performance in traversing operations than legacy Leo position code. But on inserting and deleting nodes Leo will certainly perform better, because these operations are expensive in my data structure. Considering that traversing tree is done much more often than inserts or deletes, it may prove to be worthy.
ATM I don't have enough time to work on this prototype, but it should not be too hard to change it so that it runs in ordinary web browser.
If anyone is interested I can put the code online. As I said there isn't much code and Clojurescript is kind of Lisp language, it has very simple syntax rules so even if it is the first time for you to read Clojurescript, you can guess pretty much what is the meaning of each expression.
To build it one need to install:
- node and its npm (package manager)
- java (for compiling clojurescript)
- leiningen (a clojure build tool)
- grunt (node build tool)
The rest of the libraries and tools will be automatically downloaded by these build tools.
Vitalije