add german- and english-only versions of greeting

This commit is contained in:
AntonObersteiner 2024-06-05 12:14:19 +02:00
parent 8d3f799ff6
commit efd2146962

View file

@ -15,7 +15,7 @@ def get_names(filename, pad = " "):
] ]
return names return names
greeting = """ greeting = {"": """
Re: AW: Studierendenabfrage Re: AW: Studierendenabfrage
von: Prüfungsverwaltung von: Prüfungsverwaltung
--------- ---------
@ -39,6 +39,7 @@ Viel Spaß
=== ENGLISCH VERSION === === ENGLISCH VERSION ===
Hi, Hi,
there is no database for this exam, so I added our digitized notes below, there is no database for this exam, so I added our digitized notes below,
always with the auto-generated english translation. always with the auto-generated english translation.
Maybe you can filter it with regular expressions? Maybe you can filter it with regular expressions?
@ -46,12 +47,48 @@ They are like normal text-search but more flexible:
E.g.: (Erst|Zweit)versuch would select both words: E.g.: (Erst|Zweit)versuch would select both words:
'Erstversuch' (first attempt) and 'Zweitversuch' (second attempt). 'Erstversuch' (first attempt) and 'Zweitversuch' (second attempt).
.+ will accept any text, you can add it at the start of the expression .+ will accept any text, you can add it at the start of the expression
(top of page) (top of page) to see the whole line in the menu 'List' (bottom right).
to see the whole line in the menu 'List' (bottom right).
You should find approximately 5 students. You should find approximately 5 students.
Good Luck Good Luck
""" """, "de": """
Re: AW: Studierendenabfrage
von: Prüfungsverwaltung
---------
Hallo,
Zur angefragten Prüfung gibt es leider noch keine Datenbank,
daher unten angefügt unsere Notizen aus Prüfungsakten und Personendatenbank.
Vielleicht können Sie die ja mit regulären Ausdrücken filtern.
Das funktioniert wie normale Text-Suche, nur etwas flexibler:
(Erst|Zweit)versuch z.B. würde sowohl 'Erstversuch'
als auch 'Zweitversuch' markieren.
.+ akzeptiert alle Zeichen, das können Sie an die 'Expression'
(oben auf der Seite) vorn anfügen,
um im Menü 'List' unten rechts den Anfang der Zeile zu sehen.
Sie sollten etwa 5 Studierende finden.
Viel Spaß
""", "en": """
Re: AW: Student data request
von: Exam management
---------
Hi,
there is no database for this exam, so I added our digitized notes below .
Maybe you can filter it with regular expressions?
They are like normal text-search but more flexible:
E.g.: (Erst|Zweit)versuch would select both words:
'Erstversuch' (first attempt) and 'Zweitversuch' (second attempt).
.+ will accept any text, you can add it at the start of the expression
(top of page) to see the whole line in the menu 'List' (bottom right).
You should find approximately 5 students.
Good Luck
"""}
# fünf Tatverdächtige # fünf Tatverdächtige
# Uhrzeiten, siehe Infos von Verantwortlichen # Uhrzeiten, siehe Infos von Verantwortlichen
@ -206,7 +243,7 @@ def main():
template = read_template() template = read_template()
for language in ["", "de", "en"]: for language in ["", "de", "en"]:
generated = generate_text(language = language) generated = generate_text(language = language)
generated = greeting + "\n" + generated generated = greeting[language] + "\n" + generated
text = template.replace("<replace with text>", generated) text = template.replace("<replace with text>", generated)
write_index(text, filename = f"./deploy/{language}/index.html") write_index(text, filename = f"./deploy/{language}/index.html")