Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 124973 Details for
Bug 185475
app-pda/libopensync-plugin-google-calendar crashes if you have recurrent calendar entries
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to allow recurrent events in Google calendar
recurrent_events.patch (text/plain), 2.77 KB, created by
Shawn Bohrer
on 2007-07-15 23:17:33 UTC
(
hide
)
Description:
patch to allow recurrent events in Google calendar
Filename:
MIME Type:
Creator:
Shawn Bohrer
Created:
2007-07-15 23:17:33 UTC
Size:
2.77 KB
patch
obsolete
>Index: branches/branch-0.2X/plugins/google-calendar/src/google-cal-helper.py >=================================================================== >--- plugins/google-calendar/src/google-cal-helper.py (revision 1448) >+++ plugins-mod/google-calendar/src/google-cal-helper.py (revision 1898) >@@ -139,4 +139,39 @@ > return r > >+GDEND_RE = re.compile("DTEND;[^:]*:(\S+)") >+def gdRecurToEnd(recur): >+ m = GDEND_RE.search(recur) >+ if m is None: >+ raise DateConversionError("failed to find end in \"%s\"" % recur) >+ start = m.group(1) >+ year = start[0:4] >+ month = start[4:6] >+ day = start[6:8] >+ hour = start[9:11] >+ min = start[11:13] >+ sec = start[13:15] >+ return "%s-%2s-%2sT%2s:%2s:%2s" % (year, month, day, hour, min, sec) >+ >+GDSTART_RE = re.compile("DTSTART;[^:]*:(\S+)") >+def gdRecurToStart(recur): >+ m = GDSTART_RE.search(recur) >+ if m is None: >+ raise DateConversionError("failed to find start in \"%s\"" % recur) >+ start = m.group(1) >+ year = start[0:4] >+ month = start[4:6] >+ day = start[6:8] >+ hour = start[9:11] >+ min = start[11:13] >+ sec = start[13:15] >+ return "%s-%2s-%2sT%2s:%2s:%2s" % (year, month, day, hour, min, sec) >+ >+GDRECUR_RE = re.compile("RRULE:(\S+)") >+def gdRecurToORecur(recur): >+ m = GDRECUR_RE.search(recur) >+ if m is None: >+ raise DateConversionError("failed to find rule in \"%s\"" % recur) >+ return m.group(1) >+ > class GCalRequestError(Exception): > def __init__(self, response): >@@ -160,11 +195,17 @@ > self.editUri = self.elementValue('atom:link[@rel="edit"]/@href') > self.content = self.elementValue('atom:content[@type="text"]/text()') >- self.dtstart = self.elementValue('gd:when/@startTime') >- self.dtend = self.elementValue('gd:when/@endTime') >+ self.dtrecur = self.elementValue('gd:recurrence/text()') >+ if self.dtrecur: >+ pass >+ self.dtstart = gdRecurToStart(self.dtrecur) >+ self.dtend = gdRecurToEnd(self.dtrecur) >+ self.dtrecur = gdRecurToORecur(self.dtrecur) >+ else: >+ self.dtstart = self.elementValue('gd:when/@startTime') >+ self.dtend = self.elementValue('gd:when/@endTime') > > self.eventStatus = self.elementValue('gd:eventStatus/@value') > self.whereString = self.elementValue('gd:where/@valueString') > >- #FIXME: Handle recurrency > #FIXME: Handle gd:eventStatus > >@@ -200,7 +241,11 @@ > self.addElementContent(doc, event, 'DateStarted', xsdateToOsync(self.dtstart)) > self.addElementContent(doc, event, 'DateEnd', xsdateToOsync(self.dtend)) >+ if self.dtrecur: >+ self.addElementContent(doc, event, 'RecurrenceRule', >+ self.dtrecur) >+ > self.addElementContent(doc, event, 'Location', self.whereString) > >- #TODO: UID, editUri, dtstart, dtend, recurrency, eventStatus >+ #TODO: UID, editUri, dtstart, dtend, eventStatus > return doc.toxml(encoding='utf-8') >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 185475
: 124973 |
124975