ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/FreeBSDAdmin/Reminder/facebook.py
(Generate patch)

Comparing FreeBSDAdmin/Reminder/facebook.py (file contents):
Revision 1181 by douglas, 2009-05-21T01:58:14-07:00 vs.
Revision 1196 by douglas, 2009-06-25T14:27:22-07:00

# Line 33 | Line 33 | def main(calendar, config, debug):
33                          end_time = pacific.localize(event.decoded('dtend'))
34                          where = event.decoded('location')
35  
36 +                        eid = re.compile(r'http://www\.facebook\.com/event\.php\?eid=%s$' % re.escape(id))
37 +
38 +                        if not eid.search(content):
39 +                                content += '\n\nhttp://www.facebook.com/event.php?eid=%s' % id
40 +
41                          if not entries:
42                                  entry = gdata.calendar.CalendarEventEntry()
43                                  entry.title = atom.Title(text = title)
# Line 50 | Line 55 | def main(calendar, config, debug):
55                                  entry.where.append(gdata.calendar.Where(value_string = where))
56                                  calendar.InsertEvent(entry, '/calendar/feeds/default/private/full')
57                          else:
53                                eid = re.compile(r'http://www\.facebook\.com/event\.php\?eid=%s$' % re.escape(id))
54
58                                  for index, entry in enumerate(filter(lambda entry: eid.search(entry.content.text), entries)):
59                                          if index == 0:
60                                                  entry.title.text = title

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines