jrduncans/timetracker — pull request #3 by christopher-snapp (2012-08-26 23:01:05+00:00)
Title: format changes + graphing

Tracking seconds in my timesheet was a bit of a hassle, so I've modified it to round to the nearest minute and modified the `repair` mode to recalculate the timestamps based on the new rounding method.

I also wanted to be able to visualize the amount of overtime I've worked as compared to the expected eight hour work day. I've added a `-g` argument that works in the same manner as `-p` but writes a graph to the current working directory. In order for the graph to work the way I intended it to, you will need to `repair` your current timesheet (back it up first!). The repair mode has been modified to backfill missing days including weekends which default to an expected work time of 0. While it doesn't (currently) handle vacations or holidays this will prove as a valuable tool when generating input for my 6 month and annual reviews.

Keep in mind this is my first tinkering with Ruby, so I'm sure my syntax is horrible. Regardless, I hope it is useful to some others.

BTW, I used Gruff for graphing since I didn't want to rely on Google and I'm not clear what better option there is in Ruby for this sort of task.