This crate contains definitions of traits and structs for representing DAG (Directed Acyclic Graphs) and transforming those graphs in text files as well as parsing text back to original graphs. Similar data structures implemented in Python are used by Leo editor which was my inspiration to start this project.
My current plan is as follows:
- finish this crate
- using this crate as a fondation, implement Python binary extension using PyO3
- implement Tcl binary extension using tcl crate
- if possible implement Lua binary extension
- (maybe) implement NodeJs binary extension
- using Iced GUI write ALeo editor or
- using Lua extension, write a neovim plugin and embed it in neovide editor. This would allow me to use nvim as editor for body text. The only problem, I've never wrote a plugin for neovim and I've never used Lua. Though It doesn't seem too hard.
Road map
A road towards 1.0 version of this crate:
- [x] basic support for outline item fields
(key:&str, headline:&str, flags:u16) - [x] basic support for links (methods:
children,parents) - [x] basic support for creating and breaking links between nodes
(methods:
LeoData::linkandLeoData::unlink) - [x] basic support for traversing tree
- [x] parsing
.leoxml files - [x] parsing at-file files
- [x] creating at-file files from tree
- [x] creating at-clean files from tree
[x] get test data from Leo source. Using following command:
This will provide a lot of test files.curl --location -o ../../target/leo-source-v6.8.7.zip https://github.com/leo-editor/leo-editor/archive/refs/tags/v6.8.7.zip cd ../../target unzip leo-source-v6.8.7.zip[x] line numbering node bodies
[ ] converting cursor position from body to external file and vice versa
[x] syncing at-clean files
[x] loading
.leodocuments containing- [x] at-file files
- [x] at-clean files
- [x] at-edit files
- [ ] at-auto files
[ ] saving leo documents to
.leofiles[ ] saving leo documents to sqlite3 db
[ ] supporting undo/redo
[ ] supporting tree edit commands
- [ ] insert node
- [ ] delete node
- [ ] move node up
- [ ] move node down
- [ ] move node left
- [ ] move node right
- [ ] clone node
- [ ] cut/copy/paste node
- [ ] cut/copy/paste node retaining clones
- [ ] promote node
- [ ] demote node