Some Bits: Nelson's log

Migrating Joplin to Obsidian, metadata

I’m migrating from Joplin to Obsidian for my little personal notebook. Some notes on doing that with metadata for each note.

Migrating note text is easy. Joplin has an export-to-Markdown option that creates simple .md files that can just be dropped into the Obsidian vault directory. Done. However, that doesn’t preserve any metadata the note may have.

You can get Joplin to export the metadata as well by choosing “Markdown with Front Matter” as the format. That will add tags for each note, here’s an example:

---
title: My Note
updated: 2023-03-21 17:32:36Z
created: 2021-11-08 16:12:48Z
latitude: 37.30000000
longitude: -121.80000000
altitude: 0.0000
---

It’s the dates I care about most; Obsidian’s default UI shows these when you hover over a note as “Last Modified” and “Created”.

Last Modified is pretty easy; Obsidian seems to be using the file mtime timestamp. I wrote a little Python program that parses that date and sets the mtime on each file accordingly.

Created is harder or impossible. Unix and Posix have no way to store the creation time of a file. (There’s ctime, but that’s actually the creation time of the inode and can be demolished in various ways. Also there’s no clean way to set that on a file.) I’m not sure what Obsidian is showing; NTFS on Windows does store creation time so maybe that’s what it’s using? There’s reports of people saying it gets broken when you use Obsidian Sync, so it’s apparently not reliable. I just gave up on it. I’m honestly not sure why Obsidian even shows this in the UI if it’s not correct.

The other metadata folks often care about are tags. I never set tags in Joplin so I didn’t look at it. But I think it’s as simple as reading the tags from the Joplin export and then sticking them in the note as #hashtag style tags in the body of the note. Or alternately...

Obsidian does have a way to put arbitrary metadata in a note; frontmatter, just like the Joplin export. You can use that for tags as well. For now I’m not using those. Note as near as I can tell there are no standard metadata keys for note creation time, that’d be a solution to that problem. I think some parts of the plugin ecosystem have a standard set of metadata keys they use, maybe including creation.

Thoughts on Obsidian

Obsidian’s nice! Every single time the Joplin UI bugged me I realized I should try this obviously better thing.

Obsidian also has a very active user community. I’m leery of getting deep into a complex note taking tool; I’d prefer mostly just simple text files. But it’s kinda neat to see what complex things folks are doing with it, also all the plugins.

For syncing.. this is still an experiment, but my plan for now with Obsidian syncing is to use SyncThing. Now that I understand how SyncThing deals with conflicts I’m not worried it’s going to fail in some inscrutable manner. If that doesn’t work well I’ll buy Obsidian Sync. I confess I’m balking at the price; $100/year seems like an awful lot. Maybe I should think of it as paying for Obsidian itself plus the extra network feature.

I’ve installed it on Android too and synced following these notes. Seems to work so far.

I need a good HTML export option, I like to write blog posts in Markdown and then post them to my blog, which needs HTML fragments. There’s several plugins that do it, need to pick one. I’ve tried 3-4; the two “copy as HTML” result in nothing useful in my clipboard. One of the “save to file” ones does sorta work but sure generates a lot of extra CSS, etc to make the HTML look fancy. I just want a simple HTML fragment conversion.

Update

After a couple of weeks I really like Obsidian. I’ve switched entirely over to it. Mostly I just liked the UI; say what you will about Electron bloat but the web UI + command palette paradigm makes for some nice apps. (See also: VS.Code). I still feel a bit strange about how powerful and complex Obsidian can be. Folks on Reddit are sharing their 10,000 document knowledge bases full of interlinking. But it works fine also for just a few simple text notes.

SyncThing on the folder is working fine for me to sync between two desktops, a laptop, and two Android devices. I’d rather be using Obsidian Sync but can’t quite get myself to pay the price for it.

For HTML export I’m using Obsidian Enhancing Export, the consensus choice. It uses pandoc. Honestly it’s overkill but the HTML it produces is nice. In particular it does “smart quotes” in the output, something most of the other HTML exports don’t do.