Switching databases with Things
[September 1st: updated for Things 1.2. See bottom section for details.]
I use Things for managing tasks at work, and for tracking my personal to-do list. I didn’t want to mix the two up, however, so I use two Things libraries.
To swap libraries, you need to hold down option at program launch, and choose your other library. But, since this is OS X, defaults read
and defaults write
can help us automate this process a bit: Cultured Code is simply saving the path to the file in their preferences.
I wrote a small perl script to toggle between my two libraries, and it’s available here. Save that to ThingsSwap.pl
, chmod u+x
it, and save it somewhere in your PATH
(I personally prefer ~/bin
). You’ll need to change "/PathTwo"
to your other library location, and my $USERNAME = '';
to something useful.
I was unable to open -a Things.app
from within the script, so my shell alias to quit Things, swap libraries, and relaunch the app is alias swapthings=ThingsSwap.pl && open -a Things.app
.
As of Things 1.2, I was getting an “Upgrading Things library” dialog on each swap-and-launch cycle. Cultured Code added another property list key, “SpotlightIndexedLibraryPathKey”, which needs to be updated once both your libraries have been converted for Spotlight indexing. Adding another defaults write
inside the if() blocks in the perl script to write that key as well took care of it for me.