Import data structure for inspection

35 views
Skip to first unread message

Phil

unread,
Sep 24, 2021, 9:15:47 AM9/24/21
to leo-editor
I would like to use Leo as a tool to inspect structured data from another application. In my particular case, I have a large tree data structure (perfect for Leo!), and it is possible to script the application to dump the data to a file, formatted as I desire - an ASCII representation would seem most sensible. I'd like to dump it into whatever format would be easy to import into Leo. I certainly can roll my own on this, but I'm wondering if there is a best approach for this, maybe even a "Leo standard" way.

Thanks!
Phil

tbp1...@gmail.com

unread,
Sep 24, 2021, 10:05:46 AM9/24/21
to leo-editor
I'm not sure about your data, but if it can be exported as an indented list, then you can import it into Leo as a "Tabbed File".  This will turn every line in the indented file into a new node whose headline is the text on that line.  The nodes will be indented to match your exported data.

By "indented list", I mean a file that looks like this:

item 1
item 1a
item 1b
item 1b1
item 1b1a
item 1b2
item 1c
item 2

Also, I have written a set of Leo scripts that will take a node with such a list and turn it in to an SVG mind map to a maximum depth of two, if that would be of interest.
Reply all
Reply to author
Forward
0 new messages