/iCal-Analyzer

computes event statistics for iCal calendars

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

iCal Analyzer

Reads in computer’s iCal files (*.ics, Info.plist, *.calendar and *.group). Currently, this requires running this script on a Mac. Files are assumed to be in ~/Library/Calendars.

Outputs to console statistics such as average, min, max and total hours spent per calendar. Also creates a google chart image, ‘chart.png’.

Turns iCal calendars like

into stacked bar charts like this:

Run

0. Create some iCal calendars. Be sure to have a “sleep” calendar that records when you are asleep.

1. Checkout the files from the GitHub repository at http://github.com/diN0bot/iCal-Analyzer/tree/master

git clone git://github.com/diN0bot/iCal-Analyzer.git

2. Execute the main python script

python main.py

3. Google graph creation depends on pygooglechart

http://pygooglechart.slowchop.com/

Features

  • Defines a “day” as the time between waking up. This is better than a rigid 24 hr day because it shows all events before the “cycle” refreshes. Waking up, doing some work, and then going back to sleep will create a small “day”, but this is interesting, too.

Status

Proof-of-concept

ToDo

  • generalize by reading feeds from gCal and exported iCal?
  • port to javascript or processing to get more extensible graph with horizontal scrolling and zooming, event summary mouse overs, etc
  • populate groups (useful for grouping calendars in chart)
  • handle timezones hardcoded for berlin
  • handle multi-line summaries

Known Problems

  • The google chart legend is inflexibly in reverse order to the stacking of bars in the chart

Motivation

I found this useful because I use a dozen iCal calendars to record how I spend my time. I wanted to quickly see whether I was putting in enough time to various projects, and how much exercise, socializing and time wasting I was doing each day.

I may add more features in the future. Feedback desirable: diN0bot@bilumi.org