email¶
academic_doc_generator.core.email
¶
Centralized email generation with templates.
ColloquiumRegistrationEmail
¶
Template for colloquium registration emails.
Source code in src/academic_doc_generator/core/email.py
render(student, examiner, date, time, location_text)
¶
Render the registration email text.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
student
|
EmailRecipient
|
The student being registered. |
required |
examiner
|
str
|
Name of the first examiner. |
required |
date
|
str
|
Date of the colloquium (DD.MM.YYYY). |
required |
time
|
str
|
Time of the colloquium (HH:MM). |
required |
location_text
|
str
|
Formatted location description. |
required |
Returns:
| Type | Description |
|---|---|
str
|
The rendered email body as a string. |
Source code in src/academic_doc_generator/core/email.py
EmailRecipient
dataclass
¶
Represents an email recipient with formal German addressing.
Source code in src/academic_doc_generator/core/email.py
EmailTemplate
¶
FinalGradeEmail
¶
Template for submitting final marks to the examination service.
Source code in src/academic_doc_generator/core/email.py
StudentFeedbackEmail
¶
Template for providing feedback directly to the student.
Source code in src/academic_doc_generator/core/email.py
weekday_from_string(date_str, lang='de')
¶
Get the weekday name from a date string (DD.MM.YYYY).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
date_str
|
str
|
Date in format DD.MM.YYYY. |
required |
lang
|
str
|
Language for the weekday name ("de" or "en"). Defaults to "de". |
'de'
|
Returns:
| Type | Description |
|---|---|
str
|
Name of the weekday in the specified language. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the date format is invalid or language is unsupported. |