Help me convert my dynalist to a mindmap.
I came across this thing called halfvis today and it makes such a nice map, but the text syntax doesn’t match the plain text export from dynalist.
So what I need is a converter. A jsfiddle or regex or something that formats the text right. I am a terrible programmer so I am lost.
Dynalist text is like this, 4 space indents link it to the parent above:
a
b
c
d
Halfvis text is like this:
b -> a
d -> a
c -> b
I don’t know what to do next. Hmm.
Erica
August 27, 2018, 5:11am
2
Sounds like the interview question for a programming job, lol.
I think you’ll have a better success chance by posting this under “Developers”. Someone might take the challenge and write a script for it.
I tried doing this before, its actually fairly complicated.
Checkout my stackoverflow post on a similar related topic I made
You would have to do some sort of tree traversal. It can’t be a simply regex. This should be the correct link to the problem, its a reverse level order traversal if I understand it correctly
The idea is to print last level first, then second last level, and so on. Like Level order traversal, every level is printed from left to right.
Going the opposite way, it would look like this
https://sites.google.com/a/madrocketscientist.com/jerrybeaucaires-excelassistant/text-functions/cascading-tree
If you need to go from dynalist to halfviz, it should be something like this:
Normalize data
breadth first search on first bulletpoint
Print out the relationships of children
Go one step deeper.
Print out the relationships of children
etc as far deep as needed
Repeat step 2 until everything is finished
Piotr
August 28, 2018, 8:27am
4
paste this code into chrome javascript console when you’re on your dynalist document
https://pastebin.com/VXs1nK15
1 Like
I get Uncaught TypeError: Cannot read property ‘join’ of undefined
Piotr
August 28, 2018, 4:34pm
6
right, i tested it only in zoomed node
this works for entire document (and zoomed node) https://pastebin.com/SMLLUYD8
3 Likes
This is amazing! Thank you so much Piotr!
lol I’m going to need an 8k monitor for this
Erica
August 28, 2018, 10:19pm
10
@Piotr to the rescue as always
1 Like