From 280771e545460c7935727635d1474c427243fc33 Mon Sep 17 00:00:00 2001 From: RatzzFatzz Date: Mon, 22 Dec 2025 23:37:45 +0100 Subject: [PATCH] Improve default value display on help --- README.md | 17 ++++++++++------ .../model/InputConfig.java | 20 +++++++++---------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index e5ba8b7..e1cd95a 100644 --- a/README.md +++ b/README.md @@ -34,24 +34,29 @@ Using this parameter is not required, but it is the reason I originally started -m, --mkvtoolnix= path to mkvtoolnix installation -s, --safemode test run (no files will be changes) - -t, --threads= thread count (default: 2) + -t, --threads= thread count + Default: 2 -c, --coherent= try to match all files in dir of depth with the same attribute config. Attempting increasing deeper levels until match is found (worst case applying config on single file basis) -cf, --force-coherent only applies changes if a coherent match was found for the specifically entered depth -d, --filter-date= only consider files created newer than entered date (format: "dd.MM.yyyy-HH:mm:ss") -i, --include-pattern= - include files matching pattern (default: ".*") + include files matching pattern -e, --exclude=... relative directories and files to be excluded (no wildcard) -o, -overwrite-forced remove all forced flags --forced-keywords=[, ...]... - Keywords to identify forced tracks (Defaults will be overwritten; Default: forced, signs, songs) + Keywords to identify forced tracks (Defaults will be overwritten) + Default: forced, signs, songs --commentary-keywords=[, ...]... - Keywords to identify commentary tracks (Defaults will be overwritten; Default: comment, commentary, director) + Keywords to identify commentary tracks (Defaults will be overwritten) + Default: comment, commentary, director --hearing-impaired=[, ...]... - Keywords to identify hearing impaired tracks (Defaults will be overwritten; Default: SDH, CC + Keywords to identify hearing impaired tracks (Defaults will be overwritten + Default: SDH, CC --preferred-subtitles=[, ...]... - Keywords to prefer specific subtitle tracks (Defaults will be overwritten; Default: unstyled) + Keywords to prefer specific subtitle tracks (Defaults will be overwritten) + Default: unstyled --debug Enable debug logging -h, --help Show this help message and exit. -V, --version Print version information and exit. diff --git a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/InputConfig.java b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/InputConfig.java index 0334718..bc9e69a 100644 --- a/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/InputConfig.java +++ b/src/main/java/at/pcgamingfreaks/mkvaudiosubtitlechanger/model/InputConfig.java @@ -43,7 +43,7 @@ public class InputConfig implements CommandLine.IVersionProvider { private boolean safeMode; @Min(1) - @Option(names = {"-t", "--threads"}, defaultValue = "2", description = "thread count (default: ${DEFAULT-VALUE})") + @Option(names = {"-t", "--threads"}, defaultValue = "2", showDefaultValue = CommandLine.Help.Visibility.ALWAYS, description = "thread count") private int threads; @Min(0) @@ -57,7 +57,7 @@ public class InputConfig implements CommandLine.IVersionProvider { // private boolean onlyNewFiles; @Option(names = {"-d", "--filter-date"}, defaultValue = Option.NULL_VALUE, description = "only consider files created newer than entered date (format: \"dd.MM.yyyy-HH:mm:ss\")") private Date filterDate; - @Option(names = {"-i", "--include-pattern"}, defaultValue = ".*", description = "include files matching pattern (default: \".*\")") + @Option(names = {"-i", "--include-pattern"}, defaultValue = ".*", description = "include files matching pattern") private Pattern includePattern; @Option(names = {"-e", "--exclude"}, arity = "1..*", description = "relative directories and files to be excluded (no wildcard)") @@ -66,17 +66,17 @@ public class InputConfig implements CommandLine.IVersionProvider { @Option(names = {"-o", "-overwrite-forced"}, description = "remove all forced flags") private boolean overwriteForced; - @Option(names = {"--forced-keywords"}, arity = "1..*", defaultValue = "forced, signs, songs", split = ", ", - description = "Keywords to identify forced tracks (Defaults will be overwritten; Default: ${DEFAULT-VALUE})") + @Option(names = {"--forced-keywords"}, arity = "1..*", defaultValue = "forced, signs, songs", showDefaultValue = CommandLine.Help.Visibility.ALWAYS, + split = ", ", description = "Keywords to identify forced tracks (Defaults will be overwritten)") private Set forcedKeywords; - @Option(names = {"--commentary-keywords"}, arity = "1..*", defaultValue = "comment, commentary, director", split = ", ", - description = "Keywords to identify commentary tracks (Defaults will be overwritten; Default: ${DEFAULT-VALUE})") + @Option(names = {"--commentary-keywords"}, arity = "1..*", defaultValue = "comment, commentary, director", showDefaultValue = CommandLine.Help.Visibility.ALWAYS, + split = ", ", description = "Keywords to identify commentary tracks (Defaults will be overwritten)") private Set commentaryKeywords; - @Option(names = {"--hearing-impaired"}, arity = "1..*", defaultValue = "SDH, CC", split = ", ", - description = "Keywords to identify hearing impaired tracks (Defaults will be overwritten; Default: ${DEFAULT-VALUE}") + @Option(names = {"--hearing-impaired"}, arity = "1..*", defaultValue = "SDH, CC", showDefaultValue = CommandLine.Help.Visibility.ALWAYS, + split = ", ", description = "Keywords to identify hearing impaired tracks (Defaults will be overwritten") private Set hearingImpaired; - @Option(names = {"--preferred-subtitles"}, arity = "1..*", defaultValue = "unstyled", split = ", ", - description = "Keywords to prefer specific subtitle tracks (Defaults will be overwritten; Default: ${DEFAULT-VALUE})") + @Option(names = {"--preferred-subtitles"}, arity = "1..*", defaultValue = "unstyled", showDefaultValue = CommandLine.Help.Visibility.ALWAYS, + split = ", ", description = "Keywords to prefer specific subtitle tracks (Defaults will be overwritten)") private Set preferredSubtitles; @Option(names = {"--debug"}, description = "Enable debug logging") private boolean debug;