feat: -z -00:20 als Kurzform für 0-00:20 (vom Anfang bis)
Wörter hinter -z, die mit - und einer Ziffer beginnen, werden vor argparse zu 0-… umgeschrieben; parse_ranges nimmt -B auch in Anführungszeichen an. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8edef11c78
commit
955bdc2659
1 changed files with 74 additions and 22 deletions
|
|
@ -4,12 +4,13 @@
|
|||
from pathlib import Path
|
||||
import argparse
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
import textwrap
|
||||
|
||||
from vtt2txt import (
|
||||
add_time_options, join_segments, resolve_time_ranges, split_segments, time_suffix,
|
||||
vtt_to_text,
|
||||
add_time_options, join_segments, range_argv, resolve_time_ranges, split_segments,
|
||||
time_suffix, vtt_to_text,
|
||||
)
|
||||
from yt_untertitel import (
|
||||
YT_DLP, choose_track, default_name, download, fetch_info, no_track_message,
|
||||
|
|
@ -38,7 +39,7 @@ def parse_args():
|
|||
help=f"Fließtext, auf {FLOW_WIDTH} Zeichen umbrochen, statt Untertitelzeilen",
|
||||
)
|
||||
add_time_options(parser)
|
||||
args = parser.parse_args()
|
||||
args = parser.parse_args(range_argv(sys.argv[1:]))
|
||||
resolve_time_ranges(parser, args)
|
||||
|
||||
if args.output is not None and args.output.is_dir():
|
||||
|
|
|
|||
Loading…
Reference in a new issue