From: Johannes Schilling <of82ecuq@cip.cs.fau.de>
Date: Tue, 29 Oct 2013 00:00:03 +0000 (+0100)
Subject: teilnehmertool: underscores in output-dateinamen
X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=d8b50f284d547ac26cb6f9ec1335e234e168933a;p=teilnehmertool.git

teilnehmertool: underscores in output-dateinamen
---

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