From 5f8965b83df46c0d3417045f64f27b81e624b373 Mon Sep 17 00:00:00 2001 From: kralverde Date: Sun, 28 Jan 2024 15:05:10 -0500 Subject: [PATCH] rename flag and help --- crunchy-cli-core/src/archive/command.rs | 11 ++++++----- crunchy-cli-core/src/download/command.rs | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/crunchy-cli-core/src/archive/command.rs b/crunchy-cli-core/src/archive/command.rs index 652a3a9..0a6304e 100644 --- a/crunchy-cli-core/src/archive/command.rs +++ b/crunchy-cli-core/src/archive/command.rs @@ -64,10 +64,11 @@ pub struct Archive { #[arg(long)] pub(crate) output_specials: Option, - #[arg(help = "Sanitize file names for all operating systems")] + #[arg(help = "Sanitize the output file for use with all operating systems. \ + This option only affects template options and not static characters.")] #[arg(long, default_value_t = false)] - pub(crate) universal_filenames: bool, - + pub(crate) universal_output: bool, + #[arg(help = "Video resolution")] #[arg(long_help = "The video resolution. \ Can either be specified via the pixels (e.g. 1920x1080), the abbreviation for pixels (e.g. 1080p) or 'common-use' words (e.g. best). \ @@ -232,10 +233,10 @@ impl Execute for Archive { self.output_specials .as_ref() .map_or((&self.output).into(), |so| so.into()), - self.universal_filenames, + self.universal_output, ) } else { - format.format_path((&self.output).into(), self.universal_filenames) + format.format_path((&self.output).into(), self.universal_output) }; let (path, changed) = free_file(formatted_path.clone()); diff --git a/crunchy-cli-core/src/download/command.rs b/crunchy-cli-core/src/download/command.rs index 940f8e7..7f3f305 100644 --- a/crunchy-cli-core/src/download/command.rs +++ b/crunchy-cli-core/src/download/command.rs @@ -60,9 +60,10 @@ pub struct Download { #[arg(long)] pub(crate) output_specials: Option, - #[arg(help = "Sanitize file names for all operating systems")] + #[arg(help = "Sanitize the output file for use with all operating systems. \ + This option only affects template options and not static characters.")] #[arg(long, default_value_t = false)] - pub(crate) universal_filenames: bool, + pub(crate) universal_output: bool, #[arg(help = "Video resolution")] #[arg(long_help = "The video resolution. \ @@ -258,10 +259,10 @@ impl Execute for Download { self.output_specials .as_ref() .map_or((&self.output).into(), |so| so.into()), - self.universal_filenames, + self.universal_output, ) } else { - format.format_path((&self.output).into(), self.universal_filenames) + format.format_path((&self.output).into(), self.universal_output) }; let (path, changed) = free_file(formatted_path.clone());