Timesheets from iCal

A little utility to extract timesheet data from your calendar.

I've been working on a few projects at the same time and wanted an easy way to track my time to help with billing. There are plenty of time tracking sites out there but I already use a calendar to organise my time into blocks and didn't want to double enter, so I now just prefix my calendar events and use a little tool I made to extract and filter out time tracked against each project.

Example

For some fictional project, Project A, I'd prefix any calendar events that I want to track "ProjectA: " then periodically run a little script file to extract those events as CSV:

#!/bin/bash

ical_url=https://SOME-ICAL-URL.ical

node index.js -q '^ProjectA: ' $ical_url > projectA.csv

That index.js is the entry point script for the CLI tool I made (ical-csv). It's a very thin layer over some simple iCal processing utilities I wrote (ical-utils).

The output includes just the fields that I use for my billing, so (after running the script) projectA.csv might look like this:

uid,start,end,summary,durationInHours
id123,2017-07-21 15:30,2017-07-21 17:00,ProjectA: Maximise synergy,1.5
id456,2017-07-21 10:00,2017-07-21 12:00,ProjectA: Align the value chain,2

It's simple work to whack that into a spreadsheet and aggregate by billing period to generate an invoice.

Published on: 28 Aug 2017