feat: Add shorthand parameters to video_manage_audio.py and video_manage_subtitles.py
- Added shorthand options for common arguments: - `-t` for --track - `-f` for --file - `-d` for --dir - Simplified command-line usage for managing audio and subtitle tracks in video files.
This commit is contained in:
parent
2152479d2e
commit
8ff995a29f
@ -93,14 +93,17 @@ def main():
|
||||
help='Command to run')
|
||||
|
||||
# Add other arguments with both short and long options, including defaults
|
||||
parser.add_argument("--track",
|
||||
parser.add_argument("-t",
|
||||
"--track",
|
||||
type=int,
|
||||
default=0,
|
||||
help="Audio track index (default is 0).")
|
||||
parser.add_argument("--file",
|
||||
parser.add_argument("-f",
|
||||
"--file",
|
||||
type=str,
|
||||
help="Path to a specific video file.")
|
||||
parser.add_argument(
|
||||
"-d",
|
||||
"--dir",
|
||||
type=str,
|
||||
default=os.getcwd(),
|
||||
|
||||
@ -91,7 +91,7 @@ def main():
|
||||
|
||||
# Create argument parser
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Manage subtitles tracks in video files.")
|
||||
description="Manage subtitle tracks in video files.")
|
||||
|
||||
# Define command line arguments
|
||||
# Add a positional argument for the command
|
||||
@ -101,16 +101,19 @@ def main():
|
||||
|
||||
# Add other arguments with both short and long options, including defaults
|
||||
parser.add_argument(
|
||||
"-t",
|
||||
"--track",
|
||||
type=int,
|
||||
default=0,
|
||||
help=
|
||||
"Subtitle track index (default is 0). Use 'none' to remove all subtitles."
|
||||
)
|
||||
parser.add_argument("--file",
|
||||
parser.add_argument("-f",
|
||||
"--file",
|
||||
type=str,
|
||||
help="Path to a specific video file.")
|
||||
parser.add_argument(
|
||||
"-d",
|
||||
"--dir",
|
||||
type=str,
|
||||
default=os.getcwd(),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user