Make Munich 2017 Template

This commit is contained in:
derchris 2017-05-05 18:23:40 +02:00
parent 411cbe3397
commit 78104a9b09
7 changed files with 757 additions and 3 deletions

View file

@ -195,11 +195,21 @@ def events(scheduleUrl, titlemap={}):
# iterate events on that day in this room
for event in room.iter('event'):
# aggregate names of the persons holding this talk
persons = []
personnames = []
personnames2 = []
if event.find('persons') is not None:
for person in event.find('persons').iter('person'):
personname = re.sub( '\s+', ' ', person.text ).strip()
personnames.append(personname)
personname = personname.split(",")[0]
persons.append(personname)
i = iter(persons)
personnames = [ next(i) ]
try:
personnames2 = [ next(i) ]
except StopIteration:
pass
id = int(event.get('id'))
@ -220,8 +230,8 @@ def events(scheduleUrl, titlemap={}):
'id': id,
'title': title,
'subtitle': subtitle,
'persons': personnames,
'personnames': ', '.join(personnames),
'personnames': ''.join(personnames),
'personnames2': ''.join(personnames2),
'room': room.attrib['name'],
}