+def create_bmbf_list(outdir = 'output'):
+ template = env.get_template('bmbf-unterschriftenliste.tex')
+
+
+ teilnehmer = []
+ i = 1
+ for vor, nach, hochschule in \
+ conn.execute("SELECT vorname, nachname, hochschule FROM teilnehmer ORDER BY nachname DESC"):
+
+ vor = vor.decode('utf8')
+ nach = nach.decode('utf8')
+ hochschule = hochschule.decode('utf8')
+
+ teilnehmer.append({'vorname': vor, 'nachname': nach, 'num': i, 'hochschule': hochschule})
+ i = i+1
+
+
+ with open(os.path.join(outdir, "bmbf-unterschriftenliste.tex"), 'w') as out:
+ out.write(template.render(teilnehmer=teilnehmer).encode('utf-8'))
+
+