def parse_article(generator, metadata):
 if ('event-start' not in metadata):
  return
 dtstart = parse_tstamp(metadata, 'event-start')
 if ('event-end' in metadata):
  dtend = parse_tstamp(metadata, 'event-end')
 elif ('event-duration' in metadata):
  dtdelta = parse_timedelta(metadata)
  dtend = (dtstart + dtdelta)
 else:
  msg = ("Either 'event-end' or 'event-duration' must be" + (" speciefied in the event named '%s'" % metadata['title']))
  log.error(msg)
  raise ValueError(msg)
 events.append(Event(dtstart, dtend, metadata))

def parse_article ( generator , metadata ) : if ( 'event-start' not in metadata ) : return dtstart = parse_tstamp ( metadata , 'event-start' ) if ( 'event-end' in metadata ) : dtend = parse_tstamp ( metadata , 'event-end' ) elif ( 'event-duration' in metadata ) : dtdelta = parse_timedelta ( metadata ) dtend = ( dtstart + dtdelta ) else : msg = ( "Either 'event-end' or 'event-duration' must be" + ( " speciefied in the event named '%s'" % metadata [ 'title' ] ) ) log . error ( msg ) raise ValueError ( msg ) events . append ( Event ( dtstart , dtend , metadata ) )
collect articles metadata to be used for building the event calendar :returns: none .