17 Feb 2021

Migrating from OneNote to Markdown

Over the past few weeks, I've been working on migrating my extensive collection of notes from OneNote into Markdown files. I am writing my migration process up for anyone else considering moving from OneNote to Markdown.

Why Migrate?

I recently found that I wasn't making use of my OneNote notes as much as I had previously. I realised that I hated using the OneNote client on my iPhone (5s, so a small screen), and also that my notes had grown so large (after 8 years of use) that they really needed pruning. Additionally, I didn't really like having my notes in a proprietary format that I was unable to backup and version. So I looked at the usual alternatives (Notion, SimpleNote) and also at open source alternatives (Joplin, and Laverna), but ultimately, I decided to use Markdown files in a VSCode workspace, synchronized using Dropbox.

How

I used this PowerShell script to export my OneNote notes into a basic Markdown file from the OneNote desktop client on Windows 10. It took approximately 4 hours to export all my notes (some 2640 files), across vraious OneNote notebooks.

I then wrote a second PowerShell script to format the exported Markdown files. This second script:

  • Removed any non-ASCII characters from the exported files
  • Set the page title as a level 1 header
  • Remove any empty comments from the exported files
  • Correct the list indentation for the rules used by the MarkdownLint extension in VSCode
  • Remove blank lines
  • Update source path for images (also exported out by the initial script)

Setup

As noted already, I'm using VSCode to edit my new Markdown files on my desktop. I created a new workspace for my notes that I have colour coded using the Peacock extension for VSCode. I have my notes organised in a Dropbox directory, and this is automatically backed up daily to a Git repository.

I can then access my notes on my mobile via the Dropbox app. I tried initially to use the built-in Dropbox text editor, but found this a bit limited. I eventually settled on using the 1Writer app to create and edit notes on my mobile, and I've been impressed by how intuitive it is to use.

I have been using my current setup for a few weeks now. The main pain has actually been curating the exported notes, and archiving those no longer required. I have came across a few more structured ways of using Markdown files (Foam, Obsidian), and may end up using one in the future, but for now I'm happy with my current setup.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.