Nicholas Felton’s annual reports are a thing of beauty. He meticulously tracks data about his daily life throughout the year and then collates and designs a report about the year. I could see a great benefit in having this kind of data about my work life at the end of the year for my annual and tenure reviews (especially if it looked like his).

I do keep a running log at work. I’ve done it for years, and it’s been a great way to look back on a week or month that felt unproductive and see that I really did get some things done (or not, as the case may be). Until recently, I kept the log as a plain text file on Dropbox, and I’d manually record the tasks I’d completed as well as any meetings or conversations I’d had that I might need to remember.

As plain text, the file was easy to work with. I could view and edit it on any computer as well as my phone. It was easy to grep, given that I remembered what I called that weird task I did last year. But as plain text, I couldn’t easily visualize the data as a calendar (which is what it was), and data entry relied on my remembering to type the tasks into the log.

To improve my ability to visualize some of the data, I tried out Felton’s site Daytum, but I was sidetracked often by forgetting to add data manually. I figured there had to be a better way.


Although we use Basecamp for managing projects on our team, for my day-to-day task management I waffle between paper and Taskpaper. Paper is difficult to automate, but Taskpaper is scriptable, and I was already making heavy use of a few Applescripts to augment Taskpaper’s features. So, I could easily set Taskpaper to log completed tasks to a separate text file, or even grab a ready-made script that would do it for me1.

But this didn’t solve the problem of tasks completed from Basecamp, or the other things I logged. Nor does it give me a better way of seeing this date-based data. What I needed, I realized, was for all this stuff to be in a calendar.

The Calendar as Archive

A while back, Marco Arment pointed out the problem with skeuomorphic calendar designs—you care very much about the data on today’s date, and a little bit about the data for the next few days. But you don’t really care about anything else, especially days that have passed.

I thought about how valuable those day slots could be if it contained more than a history of the appointments I’ve had. In fact, past calendar days would be invaluable if they tracked things that matter to me (and to the tenure review committee) about what I did that day besides sit through an hour of committee drudgery: Tweets to colleagues at other institutions, Github commits, completed tasks, notes about meetings, foursquare checkins (to show what campus I was at), etc. In short, I wanted an electronic diary, and I wanted it to be automatic.

Calendar as Archive

If this, then that is a web service that lets you link two separate tasks together: if this happens, then do that. For instance, you can create a task that says if someone tags me in a Facebook photo, then save a copy of that photo to my Dropbox.

One of the recipes that came to mind when I was looking to log my day to my calendar was for archiving all of your Tweets to Google calendar. This was exactly what I was looking for. If I could log Tweets, maybe I could log everything else!

I started with the services that integrate with that I use in my daily work: Twitter, RSS (for Github, my blog articles, Basecamp changes, Instapaper favorites), and Google Reader. For kicks, I added some personal stuff as well: favorites, Facebook posts & photos, and Soundcloud favorites2.

Now I had meetings, Github commits, articles I post, articles I’ve read and flagged for later use, Tweets to colleagues, location changes, and a handful of personal actions logged to my calendar, automatically, at the moment they happened in real time. But the big missing link was tasks.

Calendar as Archive, agenda view

In which I cobble together other people’s code

I knew I couldn’t automate tasks written on paper, so I made the choice to move to Taskpaper full-time. I just needed a way to trigger into logging the tasks on my calendar. They offer 2 easy ways to trigger actions: RSS and email. At first I thought about writing an Applescript that would update an RSS feed living in my Dropbox Public folder every time I completed or archived a task3, but I knew exactly how to write an Applescript to send emails. Go with what you know, they say.

My pal John Fink once told me that he does everything possible to avoid writing code. I tend to feel the opposite; I love writing code. But often this distracts me from solving a simple problem. This time I knew I could find most of what I needed in existing Applescripts and I could easily knock together the code for sending the email.

First I visited the Taskpaper Applescript wiki, and looked at Stephano Rauch’s script for archiving done tasks to another file, becuause I liked his code for checking that an Archive project existed. Then I grabbed a routine from the guy who inspired my desire to log everything in a format more appropriate to grouping things by time: Brett Terpstra. He wrote a script that archives his done tasks to Day One every night at 11pm, and I thought I could use his parsing routine for grabbing and reformatting done tasks. All I needed was the script for sending out the email, which was trivial. The final script is below, or you can grab it on Github:

set archivedTasks to ""

tell application "TaskPaper"
    tell front document

        -- This next section from Stefano F. Rausch's Archive Entries Applescript

        -- Make sure there is an archive project
        if not (exists project "Archive") then
            make project with properties {name:"Archive"} at end
        end if

        set archive to project named "Archive"

        -- This whole function is from Brett Terpstra's excellent Taskpaper to DayOne script

        repeat with _task in search with query "project != Archive and @done"
            if entry type of _task is not project type then
                -- remove common tags that won't matter after archiving
                repeat with _tag in {"na", "next", "priority", "waiting"}
                    if exists (tag named _tag of _task) then delete tag named _tag of _task
                end repeat
                -- if there's no project tag on the task, 
                -- add the task's current project as a tag
                if not (exists (tag named "project" of _task)) then
                    tell _task to make tag with properties {name:"project", value:(name of containing project of _task as rich text)}
                end if
                -- append the full text of the entry, including tags, to our log
                set archivedTasks to archivedTasks & "Tasks: " & (text line of _task)
                -- archive it
                move entry id (id of _task) to beginning of entries of project "Archive"

            end if
        end repeat

    end tell
end tell

-- Check to see if there were any completed tasks
if archivedTasks is not "" then
    -- Send mail to ifttt to archive to calendar
    tell application "Mail"
        set theNewMessage to make new outgoing message with properties {subject:"Completed #task", content:archivedTasks, visible:false}
        tell theNewMessage
            make new to recipient at end of to recipients with properties {address:""}
        end tell
    end tell
end if

I then created a task on to look for incoming emails tagged with #task, and then to log those to Google Calendar. The final step was to map the default “Archive Done Tasks” keyboard shortcut, ⌘D, to run my new script. This was most easily done with Quicksilver, which allows you to overwrite hot keys. Now I can continue to use Taskpaper as I always have, but when I archive my completed tasks they’ll automatically be logged to Google Calendar.

Nerdy. And useful. And with the Google Calendar API, potentially more useful when I get my tenure portfolio ready later this year4.

  1. I loved this feature of todo.txt
  2. Music is a great trigger for me. I can often forget a technical solution for something at work, only to remember it when I hear the song that was playing when I first thought of it. So you could argue these are work related. 
  3. This is still the best solution, I think, which I’ll write when I get a chance. 
  4. I’m just going to call it right now: I’ve waste a lot of time later this year trying to make all this data look great, like a Felton Annual Report. You heard it here first.