I’ve been really enjoying DayOne and they have recently updated their app so that the iPad, iPhone and Mac Apps can all create and manage tags. What’s been missing is a way to blast in tags based on keywords.
In this example, every time I have a journal entry with “Scott” in it, I want it to be tagged “Scott”.
Here’s how I did it:
1) Open Terminal, go to ~/Dropbox/Apps/Day One/Journal.dayone/entries
2) FOR FILES THAT DON’T HAVE TAGS, A TAG SECTION, PAINT THE SECTIONS WITH THE TAG
find . -print0 |xargs -0 grep -L “<string>Scott</string>”|xargs grep -l “Scott” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string ‘Scott'” file
3) FOR FILES THAT DON’T HAVE TAGS, DON’T HAVE A TAG SECTION, CREATE TAG SECTION
find . -print0 |xargs -0 grep -L “<string>Scott</string>”|xargs grep -l “Scott” |xargs grep -L “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags array” file
4) Then go back to #2 and re-run it. Everything that has your text should be tagged with the text you choose.
Swanky! The only thing you have to watch out for here is the little l (little ell) looks a lot like a capital I (capital-eye) – might be best to copy this into a browser and set the font to Courier just to make sure before you run it, also, the last xargs does the changes, so skipping out on that might be smart. I can’t make any guarantees that it’ll work, but as far as I can tell, it works great!
YMMV. Careful.