Command Line Basecamp
I log a lot of friggin’ time on Basecamp. We all track our time incessantly here; for client work, product development, R&D, conference calls, whatever. This means I spend a lot of time logged into Basecamp, with my browser up, typing in times and tabbing between form inputs.
While I wouldn’t call myself a command line “junkie”, I have grown to appreciate the brevity with which I can make great and terrible things happen by using it. Since Basecamp has an API, and since DHH was even kind enough to make a Ruby wrapper around it, there’s no reason I couldn’t make a tiny little command line time tracker.
SO THAT’S WHAT I DID!!!
The syntax is pretty simple, and is explained in detail on the README, but the short of it is that after you give it your Basecamp credentials, you can specify how much time for each message, or use a start/stop timer so that you don’t have to keep track of the time. A few brief examples:
# Log 1.5 hours of time to the default project track log 1.5 "How I spent this time" # start tracking time for the "Roller Derby" project track start rol # stop tracking time track stop "Constructed the roller derby foundation"
Right now, me and two other folks at thoughtbot prefer the command line to a big webpage for entering time, and use it all day every day. I finally threw it up on Github. This isn’t a thoughtbot project, so it’s under my account there.
Since it’s up on Github, you can install it as a gem:
gem sources -a http://gems.github.com sudo gem install Klondike-basecamper
HEY BUT ALSO!!!!!
If you’re already using source control via the command line, like svn or git, there’s no reason you can’t hack together a script that commits your code and uses the same commit message to log your time, simultaneously. It would probably look something like this. That’s what I use, and it’s such a hack, but it lets me commit code with
commit -l 'message'. That’ll run an svn commit on all files with that message, stop the timer and log time with that message. If I use
-ls instead of
-l it’ll start the timer again, meaning I can just
commit -ls all the day, and my time gets logged.
AND BY ALL MEANS FORK IT!!!!
Basecamper on Github