X-Git-Url: https://git.siccegge.de//index.cgi?p=teilnehmertool.git;a=blobdiff_plain;f=teilnehmertool.py;h=611d4771183cdc411eb28dbf3c86a36717b95e84;hp=f992e8c0e18d1fd88a0c9b37ab02c17e38aea59c;hb=d8b50f284d547ac26cb6f9ec1335e234e168933a;hpb=fca1e6cfe82a5558181fe2234f6a19fe778b560b diff --git a/teilnehmertool.py b/teilnehmertool.py index f992e8c..611d477 100755 --- a/teilnehmertool.py +++ b/teilnehmertool.py @@ -207,7 +207,7 @@ def create_teilnehmer_list(outdir = 'output', only_quittung=False): i = 0 teilnehmer = [] for vor, nach, nick, hochschule, betrag, bezahlt, shirtsize, zippersize, dochned, comment in \ - conn.execute("SELECT vorname, nachname, namensschild, hochschule, betrag, bezahlt, tshirt, zipper, dochned, orga_comment FROM teilnehmer ORDER BY UPPER(hochschule) ASC, UPPER(nachname) ASC"): + conn.execute("SELECT vorname, nachname, namensschild, hochschule, betrag, bezahlt, tshirt, zipper, dochned, orga_comment FROM teilnehmer ORDER BY UPPER(hochschule) ASC, UPPER(namensschild) ASC"): vor = vor.decode('utf8') nach = nach.decode('utf8') @@ -237,7 +237,7 @@ def create_teilnehmer_list(outdir = 'output', only_quittung=False): 'will_attend': will_attend, 'comment': comment}) if will_attend: - with open(os.path.join(outdir, ("%03d_quittung_%s_%s.tex" % (i, vor, nach))), 'w') as out: + with open(os.path.join(outdir, ("%03d_quittung_%s_%s.tex" % (i, vor.replace(" ", "_"), nach.replace(" ", "_")))), 'w') as out: out.write(template_quittung.render(vorname=vor, nachname=nach, uni=hochschule).encode('utf-8')) i = i+1