Congrats Vitalije!
Sometimes prototyping is the best way to argument in favor of an idea and is nice to see your prototyping going well.
In my case, Grafoscopio [1] is a prototype of the ideas I would
like to see in Leo: liveness & interactivity, a simpler
storage format (XML is too cumbersome) and fossil integration.
Grafoscopio documents are stored in STON [2] (a Smalltalk
extension of JSON) and versioned in a fossil repository[3], so an
outline includes all its history and the ones of their related
artefacts (data, images, other outlines) in a single
self-contained, self hosted fossil file. Browsing that history,
merging and diffing becomes trivial. Using Pharo have let me to
explore this ideas with agility and in a mostly solo endeavor as
coder (but with the important help of several communities).
--
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 leo-editor+...@googlegroups.com.
To post to this group, send email to leo-e...@googlegroups.com.
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.
setting leoID from os.getenv('USER'): 'vitalije'reading settings in /home/vitalije/programi/leo/trunk-git/leo/config/leoSettings.leoreading settings in /home/vitalije/programi/leo/trunk-git/leo/config/myLeoSettings.leoreading settings in /home/vitalije/programi/leo/trunk-git/leo/core/LeoPyRef.db
** isPython3: FalseLeo 5.5, build 20170624181042, Sat Jun 24 18:10:42 CDT 2017Git repo info: branch = sqlite-format, commit = 1e6da9e97999Python 2.7.6, PyQt version 4.8.6linux2wrote recent file: /home/vitalije/.leo/.leoRecentFiles.txtvitalije@phenom:~/programi/leo/trunk-git$ python launchLeo.py leo/test/unitTest.leo setting leoID from os.getenv('USER'): 'vitalije'reading settings in /home/vitalije/programi/leo/trunk-git/leo/config/leoSettings.leoreading settings in /home/vitalije/programi/leo/trunk-git/leo/config/myLeoSettings.leoreading settings in /home/vitalije/programi/leo/trunk-git/leo/test/unitTest.leo
** isPython3: FalseLeo 5.5, build 20170624181042, Sat Jun 24 18:10:42 CDT 2017Git repo info: branch = sqlite-format, commit = 1e6da9e97999Python 2.7.6, PyQt version 4.8.6linux2.saved: save-new-test.py....setting leoID from os.getenv('USER'): 'vitalije'....................test of at.printError: La Peña..............s...........................End of leoAtFile tests..............sssss........................................End of leoColor tests.............................End of leoCommands tests........End of leoConfig tests......................................s.......ss.....................................s..s.................................................................................................sss....sss...End of typing tests.End of leoEditCommands tests.............End of leoFileCommands tests......End of leoFind tests..............End of leoFrame tests.........................................................................End of leoGlobals tests..sssEnd of leoGui tests................................................................................................................................End of leoImport tests........End of leoKeys tests.........................................End of leoNodes tests.....................ss..s..ss.....EEEEEE...........................................................End of leoUndo tests..............................................................................................................................................................End of plugins unit tests.@test print redraw count: 654..all unit tests done..======================================================================ERROR: runTest (leo.core.leoTest.GeneralTestCase)@test rst3Test @no-head
----------------------------------------------------------------------Traceback (most recent call last): File "/home/vitalije/programi/leo/trunk-git/leo/core/leoTest.py", line 211, in runTest builtins.execfile(scriptFile, d) File "/home/vitalije/.leo/scriptFile.py", line 6, in <module> rst3Test(c,p) File "<string>", line 14, in __init__ File "<string>", line 54, in run File "<string>", line 43, in cleanAttributeError: 'NoneType' object has no attribute 'replace'
======================================================================ERROR: runTest (leo.core.leoTest.GeneralTestCase)@test rst3Test default
----------------------------------------------------------------------Traceback (most recent call last): File "/home/vitalije/programi/leo/trunk-git/leo/core/leoTest.py", line 211, in runTest builtins.execfile(scriptFile, d) File "/home/vitalije/.leo/scriptFile.py", line 6, in <module> rst3Test(c,p) File "<string>", line 14, in __init__ File "<string>", line 54, in run File "<string>", line 43, in cleanAttributeError: 'NoneType' object has no attribute 'replace'
======================================================================ERROR: runTest (leo.core.leoTest.GeneralTestCase)@test rst3Test doc_only_mode (set in headline)
----------------------------------------------------------------------Traceback (most recent call last): File "/home/vitalije/programi/leo/trunk-git/leo/core/leoTest.py", line 211, in runTest builtins.execfile(scriptFile, d) File "/home/vitalije/.leo/scriptFile.py", line 7, in <module> rst3Test(c,p) File "<string>", line 14, in __init__ File "<string>", line 54, in run File "<string>", line 43, in cleanAttributeError: 'NoneType' object has no attribute 'replace'
======================================================================ERROR: runTest (leo.core.leoTest.GeneralTestCase)@test rst3Test doc_only_mode (set in options doc part)
----------------------------------------------------------------------Traceback (most recent call last): File "/home/vitalije/programi/leo/trunk-git/leo/core/leoTest.py", line 211, in runTest builtins.execfile(scriptFile, d) File "/home/vitalije/.leo/scriptFile.py", line 7, in <module> rst3Test(c,p) File "<string>", line 14, in __init__ File "<string>", line 54, in run File "<string>", line 43, in cleanAttributeError: 'NoneType' object has no attribute 'replace'
======================================================================ERROR: runTest (leo.core.leoTest.GeneralTestCase)@test rst3Test show_leo_directives=False
----------------------------------------------------------------------Traceback (most recent call last): File "/home/vitalije/programi/leo/trunk-git/leo/core/leoTest.py", line 211, in runTest builtins.execfile(scriptFile, d) File "/home/vitalije/.leo/scriptFile.py", line 7, in <module> rst3Test(c,p) File "<string>", line 14, in __init__ File "<string>", line 54, in run File "<string>", line 43, in cleanAttributeError: 'NoneType' object has no attribute 'replace'
======================================================================ERROR: runTest (leo.core.leoTest.GeneralTestCase)@test rst3Test unicode characters
----------------------------------------------------------------------Traceback (most recent call last): File "/home/vitalije/programi/leo/trunk-git/leo/core/leoTest.py", line 211, in runTest builtins.execfile(scriptFile, d) File "/home/vitalije/.leo/scriptFile.py", line 10, in <module> rst3Test(c,p) File "<string>", line 14, in __init__ File "<string>", line 54, in run File "<string>", line 43, in cleanAttributeError: 'NoneType' object has no attribute 'replace'
----------------------------------------------------------------------Ran 904 tests in 94.022s
FAILED (errors=6, skipped=25)
Your file format supports p.v.u too?
Cheers -Terry
v.gnx, v.h, v.b, v.children, v.parents, v.iconVal, v.statusBits and v.uIn the other thread I have announced my experiment but it seems that I haven't explain it very well. Let me try another way.
[my experiment]
was about new file format for Leo. I knew from earlier discussion in this forum that Edward is/was not willing to approve such ideas.
[sqlite]
is meant to replace a humble open (file) function.
If[large software projects] used SQLite instead they would be able to open document almost instantaneously, implementing undo/redo that can survive restart of application would be a trivial task, and lot of other advantages he has shown.
There are also several talks about the advantages of SQLite's source code control tool *fossil* over git. Not only that history (undo/redo) of one file is possible to be kept inside document file, but also the history of all project files, with all history details like check-in comments, wiki pages, branches, diffs,... all that stuff can be kept inside one file.
Inspired by those talks I have made a script that puts entire Leo tree in fossil repository and the other script that can recreate Leo tree from fossil repository. I remember it was very fast operation even if it used files on disk for the transfer to fossil. About as fast as is checking and parsing external files in Leo. Another script used to give a timeline list of all versions of Leo tree that are recorded in the repository. That list was printed in Log pane and it was possible for user to choose one of listed versions and Leo would recreate that particular version of tree.At that point I have abandoned the experiment because I haven't any clue how to create a GUI for all those features. It wasn't so useful with just a bunch of scripts and Log pane as the only GUI elements. I have also realized that there is a problem with the gnx-s. Two different versions of Leo tree had to be shown in different commanders because all changed nodes can not have the same gnx and different bodies or headlines. I still have a strong feeling that this idea of keeping the whole history of the tree in one file has some potential, but it needs suitable GUI to be useful at all.
As I had no idea how suitable GUI could look like, nor how to solve the issue with conflicts between two different historical versions of the same node, I start to think about using sqlite database as file format for Leo documents. Knowing it would be hard to sell the idea, I let the time to pass and I did nothing about it. However that idea has never left my mind since. Recent events have lead me to final decision to do something about it.I have dived once again in Leo start-up code and this time I had more success. I have finally made the first version of my prototype. With my changes Leo can accept as input argument database file. Now I can open any ordinary xml Leo document, click a button and database version of Leo document is generated in the same folder where Leo file is located and with the extension '.db' instead of '.leo'. Later Leo can open that db file and have the same tree it would have if it parsed xml file.leoSettings and myLeoSettings as well as inside document settings are respected with the current implementation.
The only thing currently missing is restoring the position and dimension of the application window on screen.It will be trivial to implement though.
I haven't run tests because I am not sure how to run them. Edward, Terry please give me the proper sequence of steps how to run all tests and check if I broke something or not by my changes to the code.
If everything goes well I would publish git branch with my code so that you can review it.
I suppose my code style is not in accordance with the standard that is used in Leo, so I expect that I will have to prettify my code but I didn't bother to do it yet.
I have mention on the other thread that I gathered some web browser client scripting skills (also fair amount of the server stuff skills). If Leo document were sqlite database I would be able to try something with the old idea of showing whole history of Leo tree but this time in web browser. I imagine that perhaps in web browser it would be easier to overcome problems with showing more historical versions of the same node.
Also someone on this forum announced development of browser viewer of Leo documents. I expect that it could benefit also from sqlite file format and maybe some server stuff.
Hopefully, this time I have better explained the reasons and ideas that I had in mind.
If I left something unclear please help me by asking questions and I would try to answer as concise as possible.
These are the results of running unit tests. I don't know if those six failing tests are supposed to fail on my machine or they signalize that I broke something. @Edward please look at the results.
remote: Permission to leo-editor/leo-editor.git denied to vitalije
I don't know how to publish my branch. When I try to publish it in leo-editor/leo-editor.git I get:remote: Permission to leo-editor/leo-editor.git denied to vitalije
Several months ago I have forked leo-editor and made a pull request from there. When I look at that forked repository github reports that it is 8 commits ahead and 735 behind master. I have no idea how to synchronize them.