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:
Dieter Schlüter 2026-10-11 23:24:32 +02:00
commit 3aa04fff4b

View file

@ -140,8 +140,11 @@ def test_yt_dlp_runs_in_temporary_directory(fake_yt_dlp, tmp_path, monkeypatch):
assert all(cwd is not None and Path(cwd) != tmp_path for cwd in run.cwds)
template = run.calls[1][run.calls[1].index("-o") + 1]
assert template == f"{tmp_path / 'Rede'}.%(ext)s"
assert (tmp_path / "Rede.de-orig.vtt").is_file()
# Without -d: working folder abschriften/<Name>/, named after -n
work = tmp_path / "abschriften" / "Rede"
assert template == f"{work / 'Rede'}.%(ext)s"
assert (work / "Rede.de-orig.vtt").is_file()
assert (work / "Rede.quelle.json").is_file()
def test_main_prefers_manual_and_default_name(fake_yt_dlp, tmp_path, monkeypatch):