]> git.siccegge.de Git - teilnehmertool.git/commitdiff
teilnehmertool: underscores in output-dateinamen
authorJohannes Schilling <of82ecuq@cip.cs.fau.de>
Tue, 29 Oct 2013 00:00:03 +0000 (01:00 +0100)
committerJohannes Schilling <of82ecuq@cip.cs.fau.de>
Tue, 29 Oct 2013 00:00:03 +0000 (01:00 +0100)
teilnehmertool.py

index f992e8c0e18d1fd88a0c9b37ab02c17e38aea59c..611d4771183cdc411eb28dbf3c86a36717b95e84 100755 (executable)
@@ -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 \
     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')
 
         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:
             '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
                 out.write(template_quittung.render(vorname=vor, nachname=nach, uni=hochschule).encode('utf-8'))
 
             i = i+1