NishantTharani / LogSeqToObsidian

Some tools to help move my notes from LogSeq to Obsidian
101 stars 15 forks source link

LogSeqToObsidian

LogSeq and Obsidian: are two (awesome) note taking tools.

I: am a flawed human with a penchant for flitting between note taking apps.

These: are a couple of files to help me migrate from LogSeq to Obsidian.

Please: backup all of your files before trying the migration script on your own data. The script is highly experimental.

bonofix-snippet.css

A small CSS snippet to help Obsidian look more like a mix of the (LogSeq Bonofix Theme)[https://github.com/Sansui233/logseq-bonofix-theme] and Typora

Install the Minimal theme, and then paste it in your snippets folder and enable it. Doesn't do much more than (what I consider) the basics - any contributions welcome.

convert_notes.py

A basic Python script that converts LogSeq's markdown files to a style that plays nicer with Obsidian.

Usage

python convert_notes.py --logseq /path/to/logseq/graph --output /path/to/output/folder

Flags:

Further information

Known assumptions:

What this script does:

What this script does not do:

I might also like to do the below at some point

(That is, none of the below has been done)

First, a note on content reformatting. LogSeq and Obsidian both allow for headers and outlining, but one key difference is that Obsidian lets you fold headings to collapse the content under it. LogSeq doesn't let you do this, so if you want a header to be foldable, you have to indent one level under it. My script assumes that any indents you've made after a header in LogSeq are just for the purpose of folding, and should be undone. Specifically, this is what will happen:

As an example, if this is what your LogSeq note looks like:

image-20221111221326446

Then this is how your Obsidian note will end up being structured:

image-20221111231753576