Wholesale migration from Drafts to Obsidian

Hi, all. I’m attempting to move my legacy notes from Draft to Obsidian. I’ve searched, tested, and had various LLMs cook up homegrown scripts to preprocess and/or fully convert my Drafts .json export into Obsidian, but all have fallen short.

Does anyone have a script or workflow that’s reliable? I have about 1500 notes to import.

Thanks.

Hello.

I know nothing about Drafts, but with that caveat out of the way, is the JSON > Bear > Obsidian route mentioned in the link below feasible for you and your devices?

No sooner did I post this than I cracked it. Your mileage may vary, but here’s my python script:

gist.github[dotcom]/shawnyeager/ee5b4394c24ba9426782a11580d51cd4

Steps:

  1. Export .json from Drafts app
  2. Copy script into folder with exported file
  3. `python convert_drafts_to_obsidian.py {exported file} {target directory of converted files}
  4. Copy all resulting files into your Obsidian vault (best in a dedicated folder)
  5. Optionally run linting and import conversion

FWIW, I added support for Drafts to Markdown in Jimmy recently:

1 Like

Brilliant. Thanks, @marph. Now, if I’d just found this last week. :laughing:

1 Like

@marph Quick follow up: I don’t see an apparent way to get a created date into the front matter during conversion. I see --frontmatter obsidian, but this just pulls in tags, it seems?

You might try --frontmatter joplin. It adds some more information.

--frontmatter obsidian adds only tags, since it’s the only intersection between the default front matter properties and the data Jimmy can provide :smiley:

1 Like