From c207b507066bc3a2968536441d464b02de7732f6 Mon Sep 17 00:00:00 2001 From: Sergio Ribera <56278796+SergioRibera@users.noreply.github.com> Date: Sat, 13 Jan 2024 19:05:22 -0400 Subject: [PATCH] docs: rename save-path by output --- crates/sss_cli/README.md | 2 +- crates/sss_cli/src/config.rs | 3 ++- crates/sss_cli/src/main.rs | 2 +- crates/sss_code/README.md | 2 +- crates/sss_code/src/config.rs | 3 ++- crates/sss_code/src/main.rs | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/crates/sss_cli/README.md b/crates/sss_cli/README.md index 92731d0..123231a 100644 --- a/crates/sss_cli/README.md +++ b/crates/sss_cli/README.md @@ -36,7 +36,7 @@ Options: --shadow-color Support: '#RRGGBBAA' 'h;#RRGGBBAA;#RRGGBBAA' 'v;#RRGGBBAA;#RRGGBBAA' or file path [default: #707070] --shadow-blur [default: 50] -c, --just-copy Send the result to your clipboard - --save-path If it is set then the result will be saved here, otherwise it will not be saved. [default: None] + -o, --output If it is set then the result will be saved here, otherwise it will not be saved. [default: None] -f, --save-format The format in which the image will be saved [default: png] -h, --help Print help -V, --version Print version diff --git a/crates/sss_cli/src/config.rs b/crates/sss_cli/src/config.rs index 8a2c0fe..3a1cd25 100644 --- a/crates/sss_cli/src/config.rs +++ b/crates/sss_cli/src/config.rs @@ -90,10 +90,11 @@ pub struct CliConfig { pub just_copy: bool, #[clap( long, + short, default_value = "None", help = "If it is set then the result will be saved here, otherwise it will not be saved." )] - pub save_path: Option, + pub output: Option, #[clap( long, short = 'f', diff --git a/crates/sss_cli/src/main.rs b/crates/sss_cli/src/main.rs index 0074989..8f20639 100644 --- a/crates/sss_cli/src/main.rs +++ b/crates/sss_cli/src/main.rs @@ -27,7 +27,7 @@ fn main() { // return; // } - if let Some(path) = config.save_path { + if let Some(path) = config.output { img.save_with_format(path, config.save_format).unwrap(); println!("Saved!"); } diff --git a/crates/sss_code/README.md b/crates/sss_code/README.md index 68cb654..722856a 100644 --- a/crates/sss_code/README.md +++ b/crates/sss_code/README.md @@ -35,7 +35,7 @@ Options: --shadow-color Support: '#RRGGBBAA' '#RRGGBBAA;#RRGGBBAA' or file path [default: #707070] --shadow-blur [default: 50] -c, --just-copy Send the result to your clipboard - --save-path If it is set then the result will be saved here, otherwise it will not be saved. [default: None] + -o, --output If it is set then the result will be saved here, otherwise it will not be saved. [default: None] -f, --save-format The format in which the image will be saved [default: png] -h, --help Print help -V, --version Print version diff --git a/crates/sss_code/src/config.rs b/crates/sss_code/src/config.rs index f3daf45..bec3e7d 100644 --- a/crates/sss_code/src/config.rs +++ b/crates/sss_code/src/config.rs @@ -109,10 +109,11 @@ pub struct CodeConfig { pub just_copy: bool, #[clap( long, + short, default_value = "None", help = "If it is set then the result will be saved here, otherwise it will not be saved." )] - pub save_path: Option, + pub output: Option, #[clap( long, short = 'f', diff --git a/crates/sss_code/src/main.rs b/crates/sss_code/src/main.rs index 776218d..6a680bc 100644 --- a/crates/sss_code/src/main.rs +++ b/crates/sss_code/src/main.rs @@ -76,7 +76,7 @@ fn main() { // return; // } - if let Some(path) = config.save_path { + if let Some(path) = config.output { out.save_with_format(path, config.save_format).unwrap(); } }