I stopped using Leo for development a few years back because of problems with sentinel lines. However, I recently got back into contracting and needed a tool to find my around a convoluted codebase, so tried out Leo. I realized that with @clean nodes the sentinel line problem has been fixed, which is a very big deal indeed.
Anyway, have been thinking about using Leo to make some outlining documents I can share with others, just for viewing. For example a web page with an outline menu.Here is a start:To see the gist, click on the link at top of page.I'd like to make this into a Vue.js project on Github unless someone has already got something similar in development.
The idea is a standalone browser-based reader of Leo and MD files which uses some of those cool HTML5 components, like highlight, D3 trees, rich grids, presentation components etc. Also an Electron version.This could potentially become an alternate front end for Leo, by wrapping the existing Leo in a node server.I think I might have written the original HTML export stylesheet way back when and this uses a similar approach but converts to JSON in order to use some existing components and Vue. Next up is a version with a D3 tree.
On Mon, Mar 6, 2017 at 3:57 AM, Edward K. Ream <edre...@gmail.com> wrote:
I've just purchased the ebook you referenced: d3.js tips and tricks. One reason I did so was to test out the leanphttps://leanpub.com/bookstoreub distribution. Impressive.
Thanks for the welcome back!
A few more thoughts on this topic:Cool trees is D3 v4:
I'll get the Leo Viewer project up and running within a week or so on Github.I'm currently working in full stack node development with Angular / Vue on front end + D3 at moment so I should be able to leverage some of that. Vue seems better for this project than Angular.
I'm thinking the Leo Viewer could be used to generate some nice display examples from Leo generated content. Could be a good way to introduce more people to Leo.
Besides D3 there are other HTML5 components that could be added fairly easily. For example I'm also thinking it would be cool to have reveal.js make a slide show out of a subtree.
Once the viewer is useful, it is simple to make an Electron version, which makes it a complete cross platform desktop app:
And once that is working, the viewer could become an alternate front end to the existing Leo program by wrapping Leo in a node server. Node can talk to Python.
Another thing to think about down the road is making a version of Leo from Atom, basically a similar technique (wrap Python in node).https://github.com/atom/atom. Already thought of a good name for it: @Leo :-)
The differentiating factor in using Flexx rather than building the UI elements directly in Javascript is the "talking to" part. The Flexx UI Framework has built up a robust two way communication system between Python and JS which I think would be difficult to replicate.
wouldn't [you want] to spend your personal time on something where a reasonable solution may already exist.
Although if you're more comfortable in JS than Python Flexx may be a non-starter.
OK I have something at least minimally useful posted to Github for the Leo Viewer (HTML 5 Viewer) project.
The live version is here:
Edward, would it be possible to get leoeditor.com working with https? I was going to put some pages from the site into the outline, but Github pages hosts on https, so I can call insecure content.
OK I have something at least minimally useful posted to Github for the Leo Viewer (HTML 5 Viewer) project.
It doesn't have any file upload capability. In fact it the filename (docs.leo) is hardcoded and expected to be in a particular place.
Come to think of it, might be worth considering moving the leo site to Github pages if you haven't already thought about that. That way the site can be an open source project as well.
Hehe. As much as possible of Leo's existing python code must remain. I'll reject any proposal to rewrite, say, leoAtFile.py or leoNodes.py in js. Leo is, after all, about Python first.
you do know about brython (python 3 in browser)? it keeps me from having to touch too much JS but still lets me interoperate with it when I need to. if you want a browser based leo, it may be a place to start.
--
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+unsubscribe@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.
I've done some work with Brython, really cool code, heavily developed, good community.
Just posted an updated version.New features:* D3 Trees* Nested menus* Subtrees (node can point to another Leo file)* Works with trunkless trees now
I was going to use the LeoDocs file as a demo, but it has a lot of rst panes, and Leoviewer doesn't support rst.
Is it simple to convert those to md or html?