Dynalist Mindmap

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.

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

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:

  1. Normalize data
  2. breadth first search on first bulletpoint
  3. Print out the relationships of children
  4. Go one step deeper.
  5. Print out the relationships of children
  6. etc as far deep as needed
  7. Repeat step 2 until everything is finished

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

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!

:ok_hand:

1 Like

lol I’m going to need an 8k monitor for this

@Piotr to the rescue as always :ok_hand: :pray:

1 Like