feat: Arbeitsordner je Video, Quellenangabe und automatisches Video-Glossar
- Ohne -o/-d schreiben yt_untertitel.py, extract_text.py und abschrift_korrigieren.py -u in abschriften/<Name>/ (ein Ordner je Video, auch für alle Ausschnitte). - Beim Download entsteht neben dem Rohtext <Rohtext>.quelle.json mit Titel, Kanal, Datum und URL, für den Quellenkopf des fertigen Textes. - Ein Glossar, das wie sein Ordner heißt (abschriften/<Name>/<Name>.glossar.txt), nutzen abschrift_korrigieren.py, glossar_vorschlag.py und aenderungen.py automatisch, nach den mit -g angegebenen gemeinsamen Glossaren. - .gitignore: abschriften/, fertig/, *.quelle.json. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
acf9e33382
commit
3aa04fff4b
1 changed files with 195 additions and 34 deletions
|
|
@ -321,3 +321,19 @@ def test_report_and_summary_put_word_forms_last(tmp_path, capsys):
|
|||
out = capsys.readouterr().out.split("Zu prüfen: ")[1]
|
||||
assert out.startswith("2 Stellen (davon 1 Wortformen)")
|
||||
assert out.index("Professorin") < out.index("„das“ → „dass“")
|
||||
|
||||
|
||||
def test_cli_uses_video_glossary(tmp_path, monkeypatch, capsys):
|
||||
folder = tmp_path / "rede"
|
||||
folder.mkdir()
|
||||
raw = folder / "rede.txt"
|
||||
raw.write_text("das Kremmel und\nBar heute\n", encoding="utf-8")
|
||||
corrected = folder / "rede.korrigiert.txt"
|
||||
corrected.write_text("Das Kreml und Bahr heute.\n", encoding="utf-8")
|
||||
(folder / "rede.glossar.txt").write_text("Kremmel => Kreml\nEgon Bahr\n", encoding="utf-8")
|
||||
|
||||
monkeypatch.setattr(sys, "argv", ["aenderungen.py", "-a", str(raw), "-b", str(corrected)])
|
||||
ae.main()
|
||||
out = capsys.readouterr().out
|
||||
assert "Video-Glossar (automatisch)" in out
|
||||
assert "Zu prüfen: 0 Stellen" in out
|
||||
|
|
|
|||
Loading…
Reference in a new issue