iCal Prune

Version 0.1 February 13 2007

Livejournal post

I use Google Calendar
along with Schedule World
to syncronise to my MDA Vario II phone.
Thing is, experimenting with the synchronisation software led to multiple copies of an event
(in one case 147!), many with messed up time and repeat rules.
There seem to be some tools for removing iCal duplicates, but ther were in AppleScript for iCal itself.
So I’ve written a PHP script for it; it iterates through a file (exported from Google Calendar)
and weed out duplicate entries. Should work for any iCal-compatible calendaring app.

The script simply loads all lines into an array, and checks for event
start/ends; making an md5 of fields we want to check against to find duplicates.

I personally found best results in not being too obsessed with progammatically checking time zones etc.,
leaving at most 5 duplicates you can easily correct by eye once you import back in.

View/Download PHP Source

blog comments powered by Disqus

Switch to our mobile site