diff --git a/generate_bmbf_list.py b/generate_bmbf_list.py index 4bf74fd..ccc476b 100644 --- a/generate_bmbf_list.py +++ b/generate_bmbf_list.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 import csv +import datetime import os import sys import tempfile @@ -9,16 +10,22 @@ from fillpdf import fillpdfs from pdfrw import PdfReader, PdfWriter # Change to your needs -event_period = "27.10. - 31.10.23" +start_date = "2024-10-30" +end_date = "2024-11-03" event_org = "Verein der Freunde und Förderer der Bundesfachschaftentagung Elektrotechnik e.V." -event_name = "93. Bundesfachschaftentagung Elektrotechnik" -attendees_csv = "/Users/dominik/Nextcloud BuFaTa ET/Ausschüsse/Generalsekreteriat/93_teilnehmer.csv" +event_name = "95. Bundesfachschaftentagung Elektrotechnik" +attendees_csv = "95_teilnehmer.csv" empty_sheets = 1 template_form = "Teilnehmendenliste_FR_22_23_final.pdf" -date_list = ["27.10.23", "28.10.23", "29.10.23", "30.10.23", "31.10.23"] # Nothing to change below here +start = datetime.date.fromisoformat(start_date) +end = datetime.date.fromisoformat(end_date) +event_period = f'{start.strftime("%d.%m")} - {end.strftime("%d.%m.%y")}' +days = int((end - start).days) +date_list = [(start + datetime.timedelta(days=i)).strftime('%d.%m.%y') for i in range(days + 1)] + form_mapping = [("6", "20", "21"), ("19", "40", "41"), ("18", "39", "22"), ("17", "42", "23"), ("16", "43", "24"), ("15", "44", "25"), ("14", "45", "26"), ("13", "46", "27"), ("12", "Text7", "28"), ("11", "29", "34"), ("10", "30", "35"), diff --git a/teilnehmer_innen.csv b/teilnehmer_innen.csv deleted file mode 100644 index ae07987..0000000 --- a/teilnehmer_innen.csv +++ /dev/null @@ -1,3 +0,0 @@ -Vorname, Nachname, Standort, Status -Kia, Killing, Frei Universität Mordor, Student -Lio, Lampe, Sonnige Hochschule des Auenlandes, Student