Bitpim / Google Calendar / Repeating Events - Data Sample
Chris Thornton <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Organization | Thornsoft Development, Inc. |
| Message-ID | <[email protected]> |
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:[email protected] UID:[email protected] 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/[email protected]/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:[email protected] ------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642