From 61f093c2791f7e8b23de3a3958f5ef9f778407bf Mon Sep 17 00:00:00 2001 From: Johannes Schilling Date: Sun, 27 Oct 2013 17:46:51 +0100 Subject: [PATCH] teilnehmertool/helfernametags: uni gefixt, veranstaltungsleiter auch nick-nametag --- teilnehmertool.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/teilnehmertool.py b/teilnehmertool.py index 962ae77..24e9921 100755 --- a/teilnehmertool.py +++ b/teilnehmertool.py @@ -54,17 +54,17 @@ def create_helfer_nametags(csvpath, outdir='helfer_nametags'): with open(csvpath, 'r') as csvfile: csvreader = csv.DictReader(csvfile, delimiter=',', quotechar='"') + uni = "FAU Erlangen" for row in csvreader: if is_veranstaltungsleiter(row): nick = "%s %s" % (VERANSTALTUNGSLEITER[row['username']][0], VERANSTALTUNGSLEITER[row['username']][1]) - uni = "Veranstaltungsleiter" - else: - nick = "%s" % (row['username']) - uni = "FAU Erlangen" + with open(os.path.join(outdir, "%s.svg" % nick), 'w') as f: + f.write(template.render(nick=nick.decode('utf-8'), uni1=uni.decode('utf-8')).encode('utf-8')) + nick = "%s" % (row['username']) with open(os.path.join(outdir, "%s.svg" % nick), 'w') as f: - f.write(template.render(nick=nick.decode('utf-8'), uni=uni.decode('utf-8')).encode('utf-8')) + f.write(template.render(nick=nick.decode('utf-8'), uni1=uni.decode('utf-8')).encode('utf-8')) def import_teilnehmer(input): -- 2.39.5