So what did I do in the coffee shop? I wrote a small reporting tool to compute total hours spent on different projects as registered in the timereg tool I described previously. The tool is very simple; I just read the timereg log into a Python list using the readlines command and exploit the structure. I make two lists; one for project names and one for hours spent. Each time a project name is encountered that I haven't seen before when iterating over the readlines list, I add it and also add the number of hours spent in the first instance of this project. Then, just keep adding for each project:
for k in readlineslist:
if k in names:
for z in range(0,names):
Get the picture? Of course I write off everything to a text file for billing purposes.
Well, time to hit the road to the real office. Enjoy your day and happy pythoneering!