feat: write_meeting_docs() — creates index, transkript, zusammenfassung

This commit is contained in:
2026-04-02 01:05:07 +02:00
parent 9b5b89e159
commit 033c1fc486
2 changed files with 90 additions and 0 deletions
+23
View File
@@ -58,3 +58,26 @@ def test_slugify():
from output import slugify
assert slugify("Mein erstes Diktat") == "mein-erstes-diktat"
assert slugify("test -- foo") == "test-foo"
def test_write_meeting_docs_creates_three_files(tmp_path):
from output import write_meeting_docs
from datetime import datetime
aligned = [("Thomas", "Gut, dann fangen wir an."), ("Möller", "Ich hab das vorbereitet.")]
paths = write_meeting_docs(
aligned_segments=aligned,
summary="# Meeting\n\n## Wichtigste Punkte\n- Budget besprochen",
speakers=["Thomas", "Möller"],
duration_min=5,
output_dir=str(tmp_path),
dt=datetime(2026, 4, 2, 14, 30),
)
assert len(paths) == 3
index_content = open(paths["index"]).read()
assert "Thomas" in index_content
assert "transkript" in index_content
transcript_content = open(paths["transkript"]).read()
assert "**Thomas:**" in transcript_content
assert "Gut, dann fangen wir an." in transcript_content
summary_content = open(paths["zusammenfassung"]).read()
assert "Budget besprochen" in summary_content