X-Git-Url: https://git.siccegge.de//index.cgi?a=blobdiff_plain;f=teilnehmertool.py;h=913d535eefbaa8f70682b7352352b6ce6e6ce5fa;hb=d8ce5855a223ff864dc9d089d4a8cdf9ae40e015;hp=f992e8c0e18d1fd88a0c9b37ab02c17e38aea59c;hpb=fca1e6cfe82a5558181fe2234f6a19fe778b560b;p=teilnehmertool.git diff --git a/teilnehmertool.py b/teilnehmertool.py index f992e8c..913d535 100755 --- a/teilnehmertool.py +++ b/teilnehmertool.py @@ -203,11 +203,12 @@ def create_teilnehmer_list(outdir = 'output', only_quittung=False): template_full = env.get_template('teilnehmerliste.tex') template_pack = env.get_template('packliste.tex') template_quittung = env.get_template('quittung.tex') + template_strichliste = env.get_template('strichliste.tex') 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 +238,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 @@ -252,6 +253,8 @@ def create_teilnehmer_list(outdir = 'output', only_quittung=False): with open(os.path.join(outdir, "packliste.tex"), 'w') as out: out.write(template_pack.render(teilnehmer=teilnehmer).encode('utf-8')) + with open(os.path.join(outdir, "teilnehmer-strichliste.tex"), 'w') as out: + out.write(template_strichliste.render(teilnehmer=teilnehmer).encode('utf-8')) def create_teilnehmer_quittungen(output='quittungen'): @@ -264,13 +267,19 @@ def create_bmbf_list(outdir = 'output'): teilnehmer = [] i = 1 - for vor, nach, hochschule in \ - conn.execute("SELECT vorname, nachname, hochschule FROM teilnehmer ORDER BY UPPER(nachname) ASC"): + for vor, nach, hochschule, dochned in \ + conn.execute("SELECT vorname, nachname, hochschule, dochned FROM teilnehmer ORDER BY UPPER(nachname) ASC, UPPER (vorname) ASC"): vor = vor.decode('utf8') nach = nach.decode('utf8') hochschule = hochschule.decode('utf8') + if dochned != "false": + continue + + if hochschule == "Privat" : + continue + teilnehmer.append({'vorname': vor, 'nachname': nach, 'num': i, 'hochschule': hochschule}) i = i+1