RescueTime Hack: Log your meetings and phone calls (OSX only) #

February 13, 2008.

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.

RescueTime Log Time.app screenshot

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.

This entry has been tagged with , , , , , , . Follow a tag to see related entries.

  • 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!
  • 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.
  • Dan Butcher
    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.
  • Dan Butcher
    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.
  • Monkeyget
    I just finished a "Windows Port":http://monkeyget.wordpress.com/2008/04/01/push-all-your-activities-to-rescuetime/
  • Nicely done. :)
  • jln
    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 ?".
  • anne
    Thanks! I ended up getting around the three button constraint by creating one app for each tag, and I pull those up with Quicksilver. Does the trick. Was about to give up on RescueTime until they added this functionality, as I am often at my most productive away from my computer. Now I don't have to!
  • Daniel Goepp
    I like this, but it is subject to your estimation. Have you considered adding a timer to this? Phone rings, run the app, click start...talk...talk...talk...hang up, click stop. That way, it is not your estimation. I rarely remember how long I was on the phone or in a meeting.
  • > Have you considered adding a timer to this?

    No. My phone's display shows the duration of each call, and I can usually tell how long my meetings were. :) The trick (for me) is instantly logging those times in.

    Works for me.
  • manj
    Why would I want to share my data with RescueTime people?
    No way...
  • Curtis Abbott
    Does this still work OK? I have MacOSx.5 and have tried multiple times over multiple days and the time does not display anywhere.

    I would love to be able to use this.
  • No idea, sorry… I've stopped using RT about half a year ago. :(
  • Any reason why? Just considereing using it in conjunction with your script. I'm on Leopard OSX
  • I had finally figured out where all my time went, and that was that. :)

    I might start picking it up again in the near future, what with being self-employed now, but right now, I don't need it.
  • Kelvin
    I am using FruitfulTime ProductivityMeter (www.fruitfultime.com). It's windows only though.
blog comments powered by Disqus
photo of Carlo Zottmann Carlo Zottmann carlo@zottmann.org
München Germany
AIM YIM Jabber

You look like you have no time, but still need to find some Xmas gifts, but have no idea what to get them, right?

Then try my new site, random.li: fast-paced, crack S.W.A.T. team-style gift finding.

Go go go! No time to waste! :)