Migrate to Obsidian from Onenote and sync to Github

migrate from OneNote

convert OneNote to markdown script:

https://github.com/theohbrothers/ConvertOneNote2MarkDown

need OneNote desktop and office word installed. Run script with default sample config file is enough.

cleanup, run search/replace regex on .md file:

delete all image ALT(Evernote read text from image and store them in ALT tag)

search !\[.+\]\(..\/media\/

replace ![](../media/

delete image width/height

\)\{width\=.+\"\}

delete multiple lines

search ^[\r\n]{2} and replace it with single line repeatedly

Sync desktop vault to Github and browse note from mobile by Github app

  • Create private repo

  • Upload local ssh key to Github

  • Run git command in Obsidian vault folder: I am not a fan of Obsidian 3rd party plugin, so I run push/pull command manually to gain more control.

git init
git remote add (Please follow instruction from Github)
git add .
git commit -m "initial commit"
git push origin main
  • Install Github official app from mobile store. (Browsing notes from Obsidian official app with several GB of vault is not pleasant)

Use "web-clipper" browser plugin to save web page to github repo

  • Download web-clipper plugin from https://github.com/webclipper/web-clipper

  • Setup Github account in web-clipper settings. Connect your Obsidian repo to web-clipper via Github token

  • Save any web page from web-clipper

  • run git pull command so that you can see it in Obsidian desktop app.

Leave a comment

Your email address will not be published. Required fields are marked *