The following technique should be useful to anyone who keeps track of an outline or a to-do list and wants to email the current state of that to someone else easily.
One of the things we do at Clockwork to keep everyone on the same page is send out a daily ‘snapshot’ email that lists:
- what we did yesterday
- what we are going to work on today
- what we have coming up
Our project managers use snapshots to help manage work load and maintain an ambient awareness about whether we’re working on their stuff on a given day or not.
I’m a big fan of “Getting Things Done” (GTD), and the stuff in these snapshot emails is exactly the reminder system I need so I can think more about writing software and less about what I have to do today.
However, while email is a great way to communicate this information it sucks-diddly-ucks as a working to-do list. When new tasks come in, I want to capture them in my to-do list and get them out of my email inbox. Fortunately, there are lots of really good to-do applications out there, but they present a new hassle: I don’t want to spend tedious minutes every day copying and pasting information out of my to-do application and into an email. I would much rather spend that time doing something more interesting. Not to mention, I find tedious tasks much harder to motivate myself to do well.
For a long time I used OmniOutliner as a to-do application; recently, I switched to a different (slightly less expensive) application called TaskPaper. My license of OmniOutliner outdated, and the project managers wanted to standardize the way the snapshot email looked. The way OmniOutliner organized to-do lists just did not mesh well with the new format.
From To-Do to Email
First, I setup my snapshot file in TaskPaper, so it looks something like this:
TaskPaper has lots of nice features so you can add tasks, mark tasks as done, archive tasks, and a whole bunch of other stuff, all without ever taking your hands off the keyboard.
So, now the question is, how to get this information in an email.
I could just “Select all”, copy, Alt-Tab over to Mail, new message, paste, then spend a minute or so formatting the message. And that’s not too bad.
I’m a software engineer, though. If I do the same thing on my computer every day—even if it just takes a minute or two—I start thinking “I’ll bet I could automate this.” Enter: AppleScript.
If you’ve got a Mac, you find yourself repeating the same task over and over again. Stop, write an AppleScript or make an Automator task to do it for you (or even better, find one on the internet that someone else wrote for you). Life is short, automate.
A big part of why I decided to give TaskPaper a try was because of this wiki page. If you are ever trying to decide between two similar OS X Application, put the “Name of Application AppleScript” into Google. If you see lots of people writing AppleScripts for it, that good. If you don’t, look for a better option (this is especially important for any GTD related software).
Look through it carefully. You need to replace:
- “my subject” with what ever you want for the subject of the resulting email
- “Some Body” with who ever the name is of whom you want to receive this email
- “firstname.lastname@example.org” with the email address of whom you want to receive this email
You may also have noticed some calls to sed. Sed is an old unix tool for formatting strings. AppleScript is good at a lot of things, but if you want to format text, AppleScript is pretty clumsy. Sed uses regular expressions and if you want to see it in action this introduction and tutorial is a good place to start.
Once you have your AppleScript ready put it in ~/Library/Scripts/Applications/TaskPaper. You will probably need to create the TaskPaper directory. Then make sure your script menu is visible by opening AppleScript Editor’s preferences and checking “Show Script menu in menu bar” and “Show Computer scripts”. That will but the script menu in the upper right, near the clock.
When you have TaskPaper open go to the Script menu and run your script.
Look at that, I just made a snapshot email in about 2 seconds and the formatting is perfect.
- If you’re going to write anything but the most basic AppleScript do not use the built in “AppleScript Editor”, it is a terrible tool for writing code. I used TextMate. They have an AppleScript bundle that works well.
- Tip: If you do not really know AppleScript or maybe you’ve never written a line of code in your life, you want to read “Apple Training Series: AppleScript 1-2-3“.
- If you really do not want to try to read code take a look at Automator. That is very powerful an intuitive and you can access a lot of it’s power with out writing any code.