Chris Thornton
2006-05-16 00:27:32 UTC
Hello Bitpim gang,
I've done some digging into the Google Calendar, and have found that
the RRULE isn't what Bitpim is expecting. It's likely due to Google
using the fancier iCalendar format, and BitPim using the more modest
VCalendar format.
Everything else seems to mostly work, but here's where it fouls up:
Google gives an RRULE like this:
RRULE:FREQ=WEEKLY;BYDAY=MO,WE;UNTIL=20060623T221500Z
But BitPim wants it like this:
RRULE:W1 MO WE #0
If I take an entry and modify it, it'll import ok.
Here, I've replaced
RRULE:FREQ=WEEKLY;BYDAY=MO,WE;UNTIL=20060623T221500Z
with
RRULE:W1 MO WE #0
So here's the fixed record:
BEGIN:VEVENT
DTSTART;TZID=America/New_York:20060503T181500
DURATION:PT5400S
RRULE:W1 MO WE #0
DTSTAMP:20060503T140923Z
ORGANIZER;CN=Brenda :MAILTO:***@xxxx.com
UID:***@google.com
CLASS:PRIVATE
CREATED:20060502T203025Z
DESCRIPTION:Game is at 6\:30pm
LAST-MODIFIED:20060502T203025Z
LOCATION:Admin Building
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Matthew - Baseball
TRANSP:OPAQUE
END:VEVENT
Without the modification, the import DOES succeed (no failure msg),
but instead of a repeating event, there will be just one event,
starting at the right time, but also ending at that time (ends when it
starts, i.e. zero length) and it doesn't repeat. I did try playing
with the various import options, none helped.
I looked at the code for vcal_calendar.py and I can see that it's not
set up to handle the fancier RRULE. Unfortunately, this is the first
python program that I've ever looked at, and it's over my head for
now.
Looking into the question that someone else asked, about how to get
the data from google, that looks pretty easy. They make it available
via two URLs. One for just you, and one for other people that you
share with. For BitPim, you can use the "private" one. BitPim would
need to do the equivalent of a "wget", to pull down the data from an
URL like this:
http://www.google.com/calendar/ical/***@xxx.com/private-xxxxx280fd2b4xxxxc8c7212577f/basic
(I xxxed out portions, to protect my wife's calendar, but you get the
idea). The result is an icalendar file, which can be treated as a
vcalendar file. Unfortunately, most users would end up downloading
that as a file called "basic" with no extension, which makes it
cumbersome to then import into BitPim. A slick implementation would
be to have BitPim pull directly from the URL, and skip the
intermediate file.
Anyway, I can provide some more sample data, or augment the existing
sample vcal.vcs file in the SVN, with some google examples. The Google
calendar seems really nice, and I expect this will be a popular use
for BitPim.
I've done some digging into the Google Calendar, and have found that
the RRULE isn't what Bitpim is expecting. It's likely due to Google
using the fancier iCalendar format, and BitPim using the more modest
VCalendar format.
Everything else seems to mostly work, but here's where it fouls up:
Google gives an RRULE like this:
RRULE:FREQ=WEEKLY;BYDAY=MO,WE;UNTIL=20060623T221500Z
But BitPim wants it like this:
RRULE:W1 MO WE #0
If I take an entry and modify it, it'll import ok.
Here, I've replaced
RRULE:FREQ=WEEKLY;BYDAY=MO,WE;UNTIL=20060623T221500Z
with
RRULE:W1 MO WE #0
So here's the fixed record:
BEGIN:VEVENT
DTSTART;TZID=America/New_York:20060503T181500
DURATION:PT5400S
RRULE:W1 MO WE #0
DTSTAMP:20060503T140923Z
ORGANIZER;CN=Brenda :MAILTO:***@xxxx.com
UID:***@google.com
CLASS:PRIVATE
CREATED:20060502T203025Z
DESCRIPTION:Game is at 6\:30pm
LAST-MODIFIED:20060502T203025Z
LOCATION:Admin Building
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Matthew - Baseball
TRANSP:OPAQUE
END:VEVENT
Without the modification, the import DOES succeed (no failure msg),
but instead of a repeating event, there will be just one event,
starting at the right time, but also ending at that time (ends when it
starts, i.e. zero length) and it doesn't repeat. I did try playing
with the various import options, none helped.
I looked at the code for vcal_calendar.py and I can see that it's not
set up to handle the fancier RRULE. Unfortunately, this is the first
python program that I've ever looked at, and it's over my head for
now.
Looking into the question that someone else asked, about how to get
the data from google, that looks pretty easy. They make it available
via two URLs. One for just you, and one for other people that you
share with. For BitPim, you can use the "private" one. BitPim would
need to do the equivalent of a "wget", to pull down the data from an
URL like this:
http://www.google.com/calendar/ical/***@xxx.com/private-xxxxx280fd2b4xxxxc8c7212577f/basic
(I xxxed out portions, to protect my wife's calendar, but you get the
idea). The result is an icalendar file, which can be treated as a
vcalendar file. Unfortunately, most users would end up downloading
that as a file called "basic" with no extension, which makes it
cumbersome to then import into BitPim. A slick implementation would
be to have BitPim pull directly from the URL, and skip the
intermediate file.
Anyway, I can provide some more sample data, or augment the existing
sample vcal.vcs file in the SVN, with some google examples. The Google
calendar seems really nice, and I expect this will be a popular use
for BitPim.
--
Best regards,
Chris mailto:***@thornsoft.net
Best regards,
Chris mailto:***@thornsoft.net