Google Calendars published to a website....
I've previously been using iCal + DAV + phpicalendar to publish my schedule to the web. I recently decided to try out Google Calendar. Here're some comments:
1) There's no way to remove the "default" Google Calendar. Doing so deletes your Gcal account. 2) There's no web view exposed of your calendars, even if you explicitly share them - a user receiving the share has to use some other tool (Gcal or otherwise) to view a shared calendar. 3) There are still a lot of "slow" spots in the UI
To fix #2, I brewed up a combination of my old PHP iCalendar view to suck data back from Google Calendar. How? This script:
#!/bin/sh
BASEPATH=/var/www/calendar
CALPATH=$BASEPATH/calendars
for NEXT in `cat $BASEPATH/.sources`
do
NAME=${CALPATH}/`echo $NEXT | cut -d, -f 1`
URL=`echo $NEXT | cut -d, -f 2`
curl -L -f -o $NAME.ics -R -z $NAME.ics "$URL"
done
Then, of course, fix up the PATH lines as appropriate, create BASEPATH/.sources to contain a series of lines of the form "calendarname,Gcal ICS link", then set up a cron to run things. Of course, my phpicalendar install pre-existed, so that is left as an exercise to the reader.
Finally, because of a bug in Gcal, I had to comment out the following two lines from functions/ical_parser.php
$summary ='**PRIVATE**';
$description ='**PRIVATE**';
(just add // to the beginning of each line). These are lines 186 and 187 in the version of phpicalendar I have. Presumably, Google will eventually fix the way it exports events, so that this hack-around isn't necessary.
In the end, a handy web-view of my Google Calendar content.
Technorati Tags: googlecalendar
Comments
Awwww, waltzing lessons!
Posted by: Rich | May 3, 2006 11:58 AM