dundalek / markmap

Visualize markdown documents as mindmaps
MIT License
1.7k stars 175 forks source link

Parse inter-file links? #2

Closed sthesing closed 5 years ago

sthesing commented 8 years ago

I love the basic idea of this tool. If I understand it correctly, it visualizes the hierarchical structure of headings and subheadings. It would be cool to have another mode that parses the markdown files for relative links between each other and visualize those. Do you think that's possible?

Example:

These three files would show up as some sort of triangle in the visualization:

file1.md:

... ipsum dolor sit [amet](file2.md), consetetur ...

file2.md:

... sadipscing elitr, sed diam [nonumy](file3.md) eirmod tempor invidunt ut labore et ...

file3.md:

...  clita kasd gubergren, no [sea](file1.md) takimata sanctus est...
dundalek commented 8 years ago

I think this is useful and would like to have it.

The parsing part should be pretty straightforward. The more difficult part is the rendering because there can be circular references. So instead of a tree we get a general graph. So we would need extra logic to handle expanding/collapsing of nodes.

If we figure this out we could also use it to support displaying hierarchy of files in a filesystem in the atom extension. This would be really useful since I have a notes directory full of markdown files. It would be convenient to have all my notes available in one graph.

dundalek commented 5 years ago

This is now implemented, I use it in the atom extension.