You know how much I love Yojimbo. It’s great information organizer for Mac OS X which lets you store all your data like text, photos and password in one big Library. I wrote a couple of posts about Yojimbo here and here, be sure to read them to get an overview of this amazing application.
Anyway, Yojimbo has one drawback: sync and export. The developers (BareBones Software) don’t seem to be willing to release an iPhone app anytime soon, so the only way to “sync” Yojimbo would be that of exporting the whole database to Dropbox and import it later on another machine. But still, this is not a real sync, nor ax export feature: you can’t view single items in the database.
So, I wrote an Automator workflow to export notes from Yojimbo and convert them to .rtf. It uses the textutil shell script (which should come by default on any Mac OS computer) and lets you view and edit all the notes you have in Yojimbo in external apps such as TextEdit. It has some limitations anyway, we’ll see them together.
Now, download this .zip file and extract the Automator workflow. It was compiled on my Macbook, so you’ll have to edit some details like folders locations. Fire up Automator and edit the workflow like this:
First, this workflow asks for Finder items located into /Users/yourname/Library/Caches/Metadata/com.barebones.yojimbo/.
This is where Yojimbo store all is library files with metadata (Tags, creation date) attached to them. The com.barebones.yojimbo folder has a huge list of subfolders inside it, so the workflow has to pick up the folder contents including subfolders and filter certain file types (notes). Anyway, the first action you should edit is Ask for Finder Items and choose “start at:” /Users/yourname/Library/Caches/Metadata/com.barebones.yojimbo/. You should also know that Yojimbo saves single entries (notes, photos, etc.) with its own file format like .yojimbonote. For this reason I had to force the workflow to filter .yojimbonote files and change the extension to .txt to make them at least readable outside of Yojimbo. This is not the best solution anyway, ‘cause many apps like Dropbox mobile won’t read a .txt file. But there’s a solution, let’s move on.
Now, create a new folder either on your Mac or in your Dropbox folder (you’d like to backup everything,huh?) and change the “To:” path in the Copy Finder Items action to the folder you’ve just created.Do the same for the next action, Ask for Finder Items. Now, the workflow will copy the. yojimbonote files to this folders, change the extension to .txt and make them sequential to better recognize them (because by default files names are like this: E4E06083-F74E-49F6-A7B5-BA9487844760).
Last, it’s time to convert the .txt files to .rtf. To do, we’ll use the textutil shell script which in the workflow looks like this:
This script will create .rtf files from the previous .txt. You’ll need to move the .txt then, so I put 4 last actions which filter the folder looking for .txt files and move them to trash.
And that’s it.
Now, some consideration about this workflow. As every other reverse engineering method, it’s not perfect and you may encounter some issues. The biggest flaw, anyway, is that the .rtf files you’ll have won’t be “clean”: you’ll notice some weird strings into the text file which are the attached metadata. However, these strings will only show up at the top / end of the file.
But still, if you want to get notes out of Yojimbo this works great.