This commit is contained in:
Dominik Rimpf 2023-10-28 14:03:17 +02:00
parent 409142add8
commit 2d8ff40a13
2 changed files with 8 additions and 6 deletions

View file

@ -9,13 +9,13 @@ from fillpdf import fillpdfs
from pdfrw import PdfReader, PdfWriter
# Change to your needs
event_period = "28.10. - 01.11.22"
event_period = "27.10. - 31.10.23"
event_org = "Verein der Freunde und Förderer der Bundesfachschaftentagung Elektrotechnik e.V."
event_name = "91. Bundesfachschaftentagung Elektrotechnik"
attendees_csv = "teilnehmer_innen.csv"
empty_sheets = 1
template_form = "210706_Teilnehmendenliste_abgestimmt.pdf"
date_list = ["28.10.22", "29.10.22", "30.10.22", "31.10.22", "01.11.22"]
event_name = "93. Bundesfachschaftentagung Elektrotechnik"
attendees_csv = "/Users/dominik/Nextcloud BuFaTa ET/Ausschüsse/Generalsekreteriat/93_teilnehmer.csv"
empty_sheets = 2
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
@ -92,8 +92,10 @@ if __name__ == "__main__":
person_list_per_page = [person_list[i:i + persons_per_page] for i in range(0, len(person_list), persons_per_page)]
generated_files = []
for date in date_list:
final_pdf_name = f'teilnehmendenliste_{date.replace(".", "_").replace(" ", "")}.pdf'
generated_files.append(final_pdf_name)
final_pdf_path = os.path.join(cwd, final_pdf_name)
print(f'Creating {final_pdf_name}... ', end='')
create_pdf(final_pdf_path, form_path, person_list_per_page, event_period, date, event_org, event_name, empty_sheets)