metadata¶
academic_doc_generator.core.metadata
¶
Generation of web-compatible metadata files for student projects.
generate_metadata_file(output_folder, title, author, pages_text, llm_client, work_type, semester, date_str=None)
¶
Create a Jekyll-style Markdown file with frontmatter for a student project.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_folder
|
str
|
Folder where the .md file will be saved. |
required |
title
|
str
|
Title of the work. |
required |
author
|
str
|
Full name of the student. |
required |
pages_text
|
dict[int, str]
|
Extracted text from the PDF. |
required |
llm_client
|
LLMClientProtocol
|
LLM client for summary generation. |
required |
work_type
|
str
|
String indicating the type of work. |
required |
semester
|
str
|
Semester name (e.g., "Wintersemester 24/25"). |
required |
date_str
|
Optional[str]
|
Date of the work (YYYY-MM-DD). Defaults to today. |
None
|
Returns:
| Type | Description |
|---|---|
str
|
Path to the generated .md file. |
Source code in src/academic_doc_generator/core/metadata.py
get_author_slug(name)
¶
Generate a short slug from the author's name.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Full name of the person. |
required |
Returns:
| Type | Description |
|---|---|
str
|
A 4-character lowercase slug. |
Source code in src/academic_doc_generator/core/metadata.py
get_initials(name)
¶
Generate initials for a name (e.g., 'Max Mustermann' -> 'M. M.').
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Full name of the person. |
required |
Returns:
| Type | Description |
|---|---|
str
|
String containing uppercase initials followed by dots. |
Source code in src/academic_doc_generator/core/metadata.py
summarize_for_web(pages_text, llm_client)
¶
Generate a concise, English summary suitable for publication on a website.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pages_text
|
dict[int, str]
|
Mapping of page indices to text content. |
required |
llm_client
|
LLMClientProtocol
|
LLM client for summary generation. |
required |
Returns:
| Type | Description |
|---|---|
str
|
A short English summary string. |