def get(self): calendar = ManUpCalendar() feed = calendar.get_feed() for entry in feed.entry: for a_when in entry.when: date_string = a_when.start_raw[:19] date = datetime.datetime.strptime(date_string, '%Y-%m-%dT%H:%M:%S') for where in entry.where: meeting = Meeting(name=entry.title.text, start_date=date, location=where.value) meeting.put()
def insert(self, meeting): logging.debug('inserting meeting: %s' % str(meeting)) meeting_model = MeetingModel(name=meeting.name, time=meeting.time, notes=meeting.notes, current=meeting.current) meeting_key = meeting_model.put() logging.debug('successfully inserted meeting, id %d' % meeting_key.id()) return meeting_key.id()