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
|
|
@ -13,7 +13,7 @@ import re
|
|||
from aenderungen import compare, read_raw
|
||||
from abschrift_korrigieren import (
|
||||
MODEL, apply_replacements, chat_request, check_ollama, ollama_open, read_glossary,
|
||||
split_chunks,
|
||||
split_chunks, with_video_glossary,
|
||||
)
|
||||
from vtt2txt import split_segments
|
||||
|
||||
|
|
@ -226,7 +226,10 @@ def main():
|
|||
|
||||
raw = text
|
||||
known, replacements = set(), []
|
||||
for glossary in args.glossar:
|
||||
glossaries, automatic = with_video_glossary(args.glossar, args.input.parent)
|
||||
if automatic is not None:
|
||||
print(f"Video-Glossar (automatisch): {automatic}")
|
||||
for glossary in glossaries:
|
||||
_, more = read_glossary(glossary)
|
||||
replacements += more
|
||||
known.update(wrong for wrong, _ in more)
|
||||
|
|
|
|||
Loading…
Reference in a new issue