From 3313e4cabc68550ad2a068a24b20930cd5232ad8 Mon Sep 17 00:00:00 2001 From: TheCaptain989 Date: Sat, 3 May 2025 16:55:54 -0500 Subject: [PATCH] Update command-line argument syntax in documentation and script for consistency --- README.md | 4 ++-- root/usr/local/bin/striptracks.sh | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 671a947..43600bd 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ All language conditions with positive scores *and* Negated conditions with negat The script also supports command-line arguments that will override the automatic language detection. More granular control can therefore be exerted or extended using tagging and defining multiple *Connect* scripts (this is native Radarr/Sonarr functionality outside the scope of this documentation). The syntax for the command-line is: -`striptracks.sh [{-a|--audio} [{-s|--subs} ] [{-f|--file} ]] [--reorder] [{-l|--log} ] [{-c|--config} ] [{-d|--debug} []]` +`striptracks.sh [{-a|--audio} [{-s|--subs} ] [--reorder] [{-f|--file} ]] [{-l|--log} ] [{-c|--config} ] [{-d|--debug} []]`
Table of Command-Line Arguments @@ -219,8 +219,8 @@ Option|Argument|Description ---|---|--- `-a`, `--audio`|``|Audio languages to keep
ISO 639-2 code(s) prefixed with a colon (`:`)
Each code may optionally be followed by a plus (`+`) and one or more [modifiers](#language-code-modifiers). `-s`, `--subs`|``|Subtitle languages to keep
ISO 639-2 code(s) prefixed with a colon (`:`)
Each code may optionally be followed by a plus (`+`) and one or more modifiers. -`-f`, `--file`|``|If included, the script enters **[Batch Mode](#batch-mode)** and converts the specified video file.
Requires the `--audio` option.
![notes] **Do not** use this argument when called from Radarr or Sonarr! `--reorder`| |Reorder audio and subtitles tracks to match the language code order specified in the `` and `` arguments. +`-f`, `--file`|``|If included, the script enters **[Batch Mode](#batch-mode)** and converts the specified video file.
Requires the `--audio` option.
![notes] **Do not** use this argument when called from Radarr or Sonarr! `-l`, `--log`|``|The log filename
Default is `/config/log/striptracks.txt` `-c`, `--config`|``|Radarr/Sonarr XML configuration file
Default is `/config/config.xml` `-d`, `--debug`|`[]`|Enables debug logging. Level is optional.
Default is `1` (low)
`2` includes JSON output
`3` contains even more JSON output diff --git a/root/usr/local/bin/striptracks.sh b/root/usr/local/bin/striptracks.sh index 270698f..65cffee 100755 --- a/root/usr/local/bin/striptracks.sh +++ b/root/usr/local/bin/striptracks.sh @@ -76,7 +76,7 @@ mode. Source: https://github.com/TheCaptain989/radarr-striptracks Usage: - $0 [{-a|--audio} [{-s|--subs} ] [{-f|--file} ]] [--reorder] [{-l|--log} ] [{-c|--config} ] [{-d|--debug} []] + $0 [{-a|--audio} [{-s|--subs} ] [--reorder] [{-f|--file} ]] [{-l|--log} ] [{-c|--config} ] [{-d|--debug} []] Options can also be set via the STRIPTRACKS_ARGS environment variable. Command-line arguments override the environment variable. @@ -92,14 +92,14 @@ Options and Arguments: multiple codes may be concatenated. Each code may optionally be followed by a plus \`+\` and one or more modifiers. - -f, --file If included, the script enters batch mode - and converts the specified video file. - WARNING: Do not use this argument when called - from Radarr or Sonarr! --reorder Reorder audio and subtitles tracks to match the language code order specified in the and arguments. + -f, --file If included, the script enters batch mode + and converts the specified video file. + WARNING: Do not use this argument when called + from Radarr or Sonarr! -l, --log Log filename [default: /config/log/striptracks.txt] -c, --config Radarr/Sonarr XML configuration file