Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import from Roam's JSON export #411

Closed
ghost opened this issue Apr 8, 2020 · 8 comments · Fixed by #779
Closed

Import from Roam's JSON export #411

ghost opened this issue Apr 8, 2020 · 8 comments · Fixed by #779
Assignees
Labels
1. enhancement Requests to add new functionality

Comments

@ghost
Copy link

ghost commented Apr 8, 2020

RoamResearch provides a way to export your entire database as JSON. This feature would allow importing that data into org-roam. This would enable people with existing personal Roam DBs to fully switch to org-roam.

@ghost ghost added the 1. enhancement Requests to add new functionality label Apr 8, 2020
@ghost ghost assigned jethrokuan Apr 8, 2020
@jethrokuan
Copy link
Member

You may choose to export to markdown instead, here's a gist that I tried that seems to work, using pandoc and some unix utilities:

https://gist.github.com/jethrokuan/370e14b6cd9b7725b815bbdd0cb923fe

@ghost
Copy link
Author

ghost commented Apr 11, 2020

Thanks!

Some things I noticed:

  1. (necessary) There's an issue with the sed expression: https://gist.github.com/jethrokuan/370e14b6cd9b7725b815bbdd0cb923fe#gistcomment-3249735
  2. (annoyance) No page titles are generated.
  3. (nitpick) The generated file names don't get formatted the same way as native org-roam files.

2 and 3 work together for org-roam-insert to still give nice completions, so it's really just an issue of consistency with other org-roam files.

@AyeGill
Copy link

AyeGill commented Apr 11, 2020

There's another issue with aliased internal links, like [foo]([[My Foo Page]]).
sed can probably handle this more easily, but I wrote a python script to do it:

https://gist.github.com/AyeGill/72744b0e54ebf898268beb8c992cabd5

Another thing that doesn't work is "nested links" - in Roam, you can have a link as part of a page title, and this "just works" when linking to that page.
But that's probably hard to fix.

@jethrokuan
Copy link
Member

Probably easiest to write elisp to do this, sed was just a quick experiment. I'll do it if there's enough demand for it.

@nightscape
Copy link

Hey @jethrokuan, if you do, would you mind doing a screencast of you coding it?
Like a pair-programming session with an invisible buddy 😉
Doesn't need to be super-detailed and with a lot of overhead, just for people to get into the project and your thinking.

@jethrokuan
Copy link
Member

Hey @jethrokuan, if you do, would you mind doing a screencast of you coding it?

Sure, I don't really mind. It's a bit separate from this project though, so might not be so relevant.

@giansegato
Copy link

I second this request. I'd love to migrate from Roam Research, but doing manually is a very tough endeavour. It'd improve the adoption of Org Roam too.

@fabioberger
Copy link

I wrote a tool that converts Roam Research exports into Org-roam compatible markdown: https://github.com/fabioberger/roam-migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. enhancement Requests to add new functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants