refactor: Zeitauswahl nur noch über -z, -s/-e entfallen

-z 00:05:10 (ab), -z 0-00:20 (vom Anfang bis), -z 00:05-00:06 und mehrere
Bereiche, mit oder ohne Anführungszeichen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dieter Schlüter 2026-10-11 20:20:54 +02:00
commit 8edef11c78

View file

@ -493,8 +493,8 @@ def parse_args():
parser.add_argument(
"-o", "--output", type=Path,
help="Ausgabedatei (Standard: <Eingabe ohne Endung>.korrigiert.txt, "
"mit -u <Kanal>_<Titel>_<Datum>.korrigiert.txt; mit -s/-e zusätzlich "
"der Zeitraum)",
"mit -u <Kanal>_<Titel>_<Datum>.korrigiert.txt; mit -z zusätzlich "
"die Bereiche)",
)
parser.add_argument(
"-g", "--glossar", type=Path, action="append", default=[],
@ -528,7 +528,7 @@ def parse_args():
if not args.input.is_file():
parser.error(f"Eingabedatei nicht gefunden: {args.input}")
if args.bereiche and args.input.suffix.lower() != ".vtt":
parser.error("-s/-e/-z brauchen Zeitstempel: nur mit .vtt-Eingabe oder -u.")
parser.error("-z braucht Zeitstempel: nur mit .vtt-Eingabe oder -u.")
if args.output is None:
suffix = time_suffix(args.bereiche)
args.output = args.input.with_name(f"{args.input.stem}{suffix}.korrigiert.txt")