RescueTime Hack: Log your meetings and phone calls (OSX only)
Over the last week I’ve been using RescueTime. It’s a neat little service that’s keeping track of what you are doing all day long on your machine (Mac or PC) by logging which applications are having the focus. On the site you can then tag the different applications with different keywords (for example, my Mail.app times are tagged with “work”, “communications” and “email”).
And, to make it actually useful, you can analyse your time spent, graphs and all! Check the product tour on RescueTime.com for more infos and some screenshots. It’s pretty neat. (Yes, privacy concerns, blah blah blah. It’s not the topic of this article, so please keep it to yourself for the moment. Thanks. :])
So far so good.
My problem, tho, is that I spend quite a bit of time both on the phone and in meetings. Naturally, RT won’t track these times, since these are basically off-screen activities. Uncool.
So after digging around in the RT log files I was amazed to learn they’re just YAML files. Eeeeexcellent. I can work with that!
But I wanted something with a GUI, something a bit “cooler” than just a Ruby script. So I took this as opportunity to get a bit into Applescript. Unfortunately, RescueTime’s Mac doodad doesn’t offer an Applescript API, and I had to improvise.
After two hours of playing around and cursing at Applescript’s syntax (they’re all on crack…), I had something sufficiently cool to show for.

So, what is it? It’s a little application that you run everytime you want to log some off-screen time. Basically, it’s just a dialog that allows you to enter a number (i.e. minutes spent), and has some buttons to either log these minutes as “was on the phone” or “was in a meeting”. If you hit “Cancel”, it won’t do anything. (Surprise.)
Let’s say I’ve just spent 15 minutes on the phone, I’ll run the application, enter “15” and hit the Return key — and the last 15 minutes will be logged as phone call in RT. The app will quit once that’s done. Another meeting, another phone call? Rinse, repeat.
Data-wise, it’ll then create a new file in the right format in RescueTime’s log directory (~/Library/RescueTime/Logs/Pending/). On the next data upload RT will pick up the new file, and it’ll appear in your stats as “manual_phonecall”. Your meetings will appear as “manual_meeting”.
Please note: Neither existing RescueTime files nor the RescueTime application will be touched or tinkered with.
Below you’ll find two downloads. The first one is the actual script in plain text. The second is the script compiled as application bundle. If you’re unsure which to pick, you’ll most likely want the latter. ;)
Have fun.
DISCLAIMER: I’ll take no responsibility for loss of data, hair or life. I am very, very sure there won’t be any losses, but still. It works for me, and I’m sharing. Use at your own risk.
I can’t tell you how excited this make me that we’ve got people hacking RescueTime. You might say, “it’s hard to overstate my satisfaction…” ;)
Angus Helm with his Linux data collector and your simple app to add meeting and phone time into the data stream is just awesome.
We are in a seriously busy development cycle through the end of March and will have a lot of new features and enhancements coming in the next few weeks. My personal goal for the RescueTime data collectors is to provide an open system (potentially opened source) for plug-in types of features just like this one.
Thanks Carlo!
[…] Check out the details here. […]
You’re welcome! Thanks for th kind words and the link back from the official blog. I appreciate it. :)
Cheers from Munich,
Carlo
Thank you for this cool feature. I figure adding this as a quicksilver plugin would be quite easy.
Probably. I’ve switched to Launchbar a few weeks ago, tho. ;)
I have a big keyboard with extra keys, and just put the app on one of these. Beats everything else…
This is a great app. Someone needs to create something like this for windows… I would if I knew how.
Great script! Thanks for making it public.
I wanted to add some buttons for other off-line tasks like reading and grading (I’m a teacher), but when I edited the script, I got an error saying that only three buttons are allowed. I couldn’t find a place in the script where that was specified—could you point me to the piece of code I would need to modify so that I can add more buttons?
Thanks in advance—
Dan, I believe the 3 is the actual maximum number of buttons an OSX dialog can have. So I think it’s actually an enforced restriction from the OS itself. :/
I might be wrong, tho.
Too bad—but that makes sense. I replaced “cancel” with one of my choices. It occurs to me that I could duplicate and rename the script for a second set of options.
[…] what you do on your computer. A chap named carlo created an script to log your phone calls and meetings. I have decided to implement the same thing on […]
[…] RescueTime Hack: Log your meetings and phone calls (OSX only) [tail -f carlo.log] (tags: mac timetracking) […]
[…] with this service is that is only logs what you do on your computer. A chap named carlo created a script to log your phone calls and meetings (OS X only). I have decided to implement the same thing on […]
I just finished a Windows Port
Nicely done. :)
It’s a very nice hack ! Discovered it via the Linux rescuetime collector website. (I use it on my eeePC, nice addition to my Macs)
But the fact is, I use rescuetime because I not very good at tracking the exact time I spend at a task.
So I’d rather have it the other way :
- before the task, I’d start the script — that would log the start time – on hitting stop it would log the stop time – and prompt me for the name of the task — maybe with a predefined list.
I’ll try to re-hack your hack to a version doing that.
PS : A maybe even better way would be to detect when you are idle, and prompt you
“what are doing now ?”.