Roam JSON export -> Obsidian Markdown, preserving block references

Hi there,

I just converted my Roam DB over to Obsidian. I love being back in control over my notes now :smile:!

Here is the little python script I used to convert Roam’s JSON into Markdown, preserving block references: github.com/renerocksai/rj2obs

Admittedly, it doesn’t have the most fancy command line interface yet, but that’s because it was originally just intended to be used by me.

Might make it more user-friendly, though.

Feedback is welcome!

1 Like

Just used it, it worked like a charm, thanks a lot. Quick question (if you used namespaces in Roam): how did you deal with them? I found that on export they create empty folders but the actual content of the blocks is still contained in the original note where the namespace was created. Thanks!

Hi there, great it worked!

I used namespaces in exactly 1 occasion, which is why I took extra care that they are dealt with. I had noticed that Roam’s Markdown export also created folders, so I decided to mimic that behavior:

[[ [[A]] / [[B]] ]] - creates folder A and puts note B in there if such a note exists

In my case, one note B existed :smile:.

So it can happen that you end up with empty folders - but you can ignore or delete them.
Cheers!