Q:

Merging multiple Google Calendar feeds for display on my desktop

I have several Google calendars that I'd like to merge and place on my windows desktop using Samurize. I've tried using Samurize's Page Scraper plugin, but it doesn't appear to be up to the task.
I can get Samurize to run a script and place it's output on the desktop, but I'm not sure 
what the best tools are to do this.
All the URLs I have are of the form:
http://www.google.com/calendar/feeds/example%40gmail.com/private-REMOVED/basic?futureevents=true&orderby=starttime&sortorder=ascending&singleevents=true

So I could fetch them using curl, but then I need to filter them.
I want something that looks like:
2009 12 02  Event from calendar 1's description 
2009 12 03  Event from calendar 2's description 
2009 12 04  Event from calendar 1's description 
2009 12 05  Event from calendar 3's description 
2009 12 06  Event from calendar 1's description 

However the dates in the calendar feeds are formatted like this:
<title type='html'>Event from calendar 1's description</title><summary type='html'>When: Fri 5 Dec 2008&lt;br&gt;

So how do I filter out the dates and descriptions, and convert the dates? 
(I have cygwin installed so something using perl or sed/awk would be perfect as I'm familiar enough with them that I'd be confident about altering them in future, but I'm open to suggestions.)

A:

Building on John W's script this is what I'm using
#!c:\cygwin\bin\perl.exe -w
use strict;
use LWP::Simple qw(get);

my %calendars = ( "Sam Hasler", "http://www.google.com/calendar/feeds/blah/blah/basic"
                , "Family    ", "http://www.google.com/calendar/feeds/blah/blah/basic"
                , "Work      ", "http://www.google.com/calendar/feeds/blah/blah/basic"
                );

my $params = "?futureevents=true&orderby=starttime&sortorder=ascending&singleevents=true";

my %months = ( "Jan", "01", "Feb", "02", "Mar", "03", "Apr", "04"
             , "May", "05", "Jun", "06", "Jul", "07", "Aug", "08"
             , "Sep", "09", "Oct", "10", "Nov", "11", "Dec", "12");

my $calendar_name;
my $calendar_url;
my @lines;

while (($calendar_name, $calendar_url) = each(%calendars)){
    my $calendar_data = get "$calendar_url$params";
    @lines = split(/\n/, $calendar_data);

    foreach (@lines) {
        if (/<title type='html'>([\d\D]*)<\/title><summary type='html'>When: (\S+) (\S+) (\S+) (\S+)&lt;br&gt;/)
        {
            my $day = "$3";
            if ($3 < 10 ) {
                $day = "0$3";
            }

            print "$5 $months{$4} $day\t$calendar_name\t$1\n";
        }
    }

}

I just pipe the output through sort to get it in date order.
Update: I've converted my script to a plugin and submitted it to the Samurize website: Merge Google Calendar feeds.

