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
|
|
@ -473,13 +473,16 @@ def parse_args():
|
|||
|
||||
def main():
|
||||
# abschrift_korrigieren imports this module: import it only when needed
|
||||
from abschrift_korrigieren import apply_replacements, read_glossary
|
||||
from abschrift_korrigieren import apply_replacements, read_glossary, with_video_glossary
|
||||
from yt_untertitel import base_language
|
||||
|
||||
args = parse_args()
|
||||
raw = read_raw(args.roh)
|
||||
terms, replacements = [], []
|
||||
for glossary in args.glossar:
|
||||
glossaries, automatic = with_video_glossary(args.glossar, args.korrigiert.parent)
|
||||
if automatic is not None:
|
||||
print(f"Video-Glossar (automatisch): {automatic}")
|
||||
for glossary in glossaries:
|
||||
more_terms, more_replacements = read_glossary(glossary)
|
||||
terms += more_terms
|
||||
replacements += more_replacements
|
||||
|
|
|
|||
Loading…
Reference in a new issue