Import map from Freeplane

Has anyone managed to export a file from Freeplane to import it into Logseq?

I don’t get it, even though there is the possibility in Freeplane to export to OPML, and when importing it to Logseq it doesn’t give any import error, however, apparently no page is created nor do I notice any change in the graph…

Funny you ask this since I tried doing the same thing.
So Freeplane has the option to export mindmaps to the OPML extension, which is a standard format for outlines.

And Logseq in theory has the option to import from OPML, however unfortunately currently it does not really work:

I have tried to import OPML files to Logseq with no success, and I would love it if it worked because I have a ton of mind maps. Let’s hope they fix this feature.

Another option from Freeplane is to export to markdown, which will generate a text file with lines whose indentation levels are equivalent to the number of #. That does not work in Logseq but using something like VSCode you could replace the # with tabs and add a - before each text. You also need to delete empty lines. Not ideal, but could work. Maybe I will write a script for that.

2 Likes

Correct. Before I said “export to EDN” and I meant OPML. I wrote it from my memory, from my phone. My mistake.

I have tried to import OPML files to Logseq with no success, and I would love it if it worked because I have a ton of mind maps. Let’s hope they fix this feature.

Let’s hope!

Another option from Freeplane is to export to markdown, which will generate a text file with lines whose indentation levels are equivalent to the number of #. That does not work in Logseq but using something like VSCode you could replace the # with tabs and add a - before each text. You also need to delete empty lines. Not ideal, but could work. Maybe I will write a script for that.

Hmmmm, let me try this, too :slight_smile: Awk, sed, tr, etc are your friends…

If you write a script, please share it with us here!

1 Like

awk '{ gsub("#","\t", $1); print }' input.md | awk NF | sed 's/^[ ]*//' > output.md

1 Like

your script is going in the right direction, it is only missing the addition of - before each text.

1 Like

Ok, it’s a bit clunky, but it seems to work. If you are up to do it in a script that accepts the two parameters of input.md and output.md or whatever you need, you know, go ahead and share :wink:

awk '{ gsub("#","\t", $1); print }' input.md| awk NF | sed 's/^[ ]*//'| sed 's/ / - /' > output.md

1 Like

It works great, thanks!

1 Like

how I can run this script?