`Custom Dictionary.txt` sync tool

Long ago, Obsidian used to keep the custom dictionary in the .obsidian folder where it was easy to keep in sync across multiple devices.

This is no longer the case; you now have a unique Custom Dictionary.txt file per host that you use Obsidian on.

I use obsidian heavily on a few computers but access one vault or another from time to time across many computers and I got tired of having to keep adding various project names and custom words to the dictionaries on each computer… so I took a few precious spare hours to make the task of synchronizing the custom dictionary files on every computer a bit less tedious.

The sync.py from this repo is the trick.

It’s a very crude/basic tool but it does what I need it to do: merge all of the words in a local Custom Dictionary.txt with a global list and then overwrite the local dictionary with the master dictionary.

The global list is kept in sync across all my devices so when I add a new word to the dictionary on one computer, I just run the script and about 1 second later, the master dictionary - on all my computers - has the new word. I can run the same script as needed to update the local dictionary on the other devices.

Not elegant, but it’s all the time I had. I haven’t done any serious JS work in about a decade so that’s why it’s implemented in python.

I would love to see somebody turn this into a native plugin for obsidian; I am pretty sure the API to manipulate the Custom Dictionary.txt is available to obsidian plugins. Or, better yet, I’d love to see custom dictionary sync come back to obsidian natively.

4 Likes

You can request that here: Plugins ideas - Obsidian Forum

2 Likes

https://github.com/kquinsland/obsidian-dictionary-sync-tool

Could you share your repo again? It seems you deleted it.

Sorry about that! I could have sworn that I turned it public before posting here but maybe i didn’t click “yes, i am sure” to the prompt that comes up when you do this.

It is now public.

1 Like

Thanks for sharing, I’m going to use it this week to tamper my frustrations with the stock dictionary a bit lol

Unfortunately, using pure symlinks doesn’t work. Obsidian on startup destroys the symlink and reinstates the original file – and that’s Linux (not even Windows).

I’d rather have a solution that doesn’t involve me remembering to sync manually.

The tool doesn’t exist in isolation; you can cron or *.timer or similar.
If you use the Templater plugin, you can use it to run either a system command or a JS script. It’s not quite as elegant as automatic but it is possible to sync dictionary file(s) w/o leaving obsidian.

Having said that, it’s still a pain in the ass to do python venvs on multiple machines.


I re-wrote the tool in rust so it’s a standalone 2MB binary for each system.

I am tidying up the release now but should have the repo public soon. I’ll include a version of the template and js function that I’m using to call the dictionary sync tool from within obsidian.

If there’s another obsidian plugin that can run a script or other command on close, that’d be awesome but I’m not aware of any such plugin.

1 Like

Only doing it Linux, too but even that is ineffecient if I don’t properly shut down Windows on the dual-boot laptop.

But thanks a bunch for the idea: with a bit of trim and chat bot help I’ve been using it (didn’t work for me out of the box).

Kudos