feat: Standard-Dateiname aus Kanal, Titel und Datum des Videos
- yt_untertitel.default_name(): <Kanal>_<Titel>_<Datum>, z. B. John_Mearsheimer_Offensive_Realism_Episode_1_Origins_of_the_War_In_Ukraine_2026-07-30 - Bindestriche/Punkte im Wort bleiben, Kanal max. 40, Titel max. 60 Zeichen an Wortgrenze; ohne Kanal und Titel die Video-ID - Gilt ohne -o/-n in extract_text.py (statt output.txt), yt_untertitel.py und rede_korrigieren.py -u (statt Video-ID) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
fb9201b721
commit
3d9a5037c2
1 changed files with 105 additions and 29 deletions
|
|
@ -13,7 +13,7 @@ import urllib.request
|
|||
from aenderungen import REVIEW_MARK, print_summary, report_path, write_report
|
||||
from extract_text import fetch_text
|
||||
from vtt2txt import vtt_to_lines
|
||||
from yt_untertitel import YT_DLP, base_language, original_language
|
||||
from yt_untertitel import YT_DLP, base_language, default_name, original_language
|
||||
|
||||
MODEL = "qwen3:32b"
|
||||
OLLAMA_URL = "http://127.0.0.1:11434/api/chat"
|
||||
|
|
@ -452,7 +452,7 @@ def parse_args():
|
|||
parser.add_argument(
|
||||
"-o", "--output", type=Path,
|
||||
help="Ausgabedatei (Standard: <Eingabe ohne Endung>.korrigiert.txt, "
|
||||
"mit -u <Video-ID>.korrigiert.txt)",
|
||||
"mit -u <Kanal>_<Titel>_<Datum>.korrigiert.txt)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"-g", "--glossar", type=Path, action="append", default=[],
|
||||
|
|
@ -516,7 +516,7 @@ def read_source(args):
|
|||
raise SystemExit(
|
||||
f"Die Rede ist auf „{lang}“; unterstützt: {', '.join(PROMPTS)} (-l)."
|
||||
)
|
||||
target = args.output or Path(f"{info['id']}.korrigiert.txt")
|
||||
target = args.output or Path(f"{default_name(info)}.korrigiert.txt")
|
||||
raw = "\n".join(lines) + "\n"
|
||||
save_raw_text(raw_text_path(target), raw)
|
||||
return raw, target, lang
|
||||
|
|
|
|||
Loading…
Reference in a new issue