Dynalist Mindmap

answered

#1

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.


#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.


#3

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

#4

paste this code into chrome javascript console when you’re on your dynalist document
https://pastebin.com/VXs1nK15


#5

I get Uncaught TypeError: Cannot read property ‘join’ of undefined


#6

right, i tested it only in zoomed node
this works for entire document (and zoomed node) https://pastebin.com/SMLLUYD8


#7

This is amazing! Thank you so much Piotr!


#8

:ok_hand:


#9

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


#10

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