Skip to content

Commit

Permalink
docs: rename save-path by output
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioRibera committed Jan 13, 2024
1 parent f48f83a commit c207b50
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion crates/sss_cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Options:
--shadow-color <SHADOW_COLOR> Support: '#RRGGBBAA' 'h;#RRGGBBAA;#RRGGBBAA' 'v;#RRGGBBAA;#RRGGBBAA' or file path [default: #707070]
--shadow-blur <SHADOW_BLUR> [default: 50]
-c, --just-copy Send the result to your clipboard
--save-path <SAVE_PATH> If it is set then the result will be saved here, otherwise it will not be saved. [default: None]
-o, --output <OUTPUT> If it is set then the result will be saved here, otherwise it will not be saved. [default: None]
-f, --save-format <SAVE_FORMAT> The format in which the image will be saved [default: png]
-h, --help Print help
-V, --version Print version
Expand Down
3 changes: 2 additions & 1 deletion crates/sss_cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,
pub output: Option<PathBuf>,
#[clap(
long,
short = 'f',
Expand Down
2 changes: 1 addition & 1 deletion crates/sss_cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}
Expand Down
2 changes: 1 addition & 1 deletion crates/sss_code/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Options:
--shadow-color <SHADOW_COLOR> Support: '#RRGGBBAA' '#RRGGBBAA;#RRGGBBAA' or file path [default: #707070]
--shadow-blur <SHADOW_BLUR> [default: 50]
-c, --just-copy Send the result to your clipboard
--save-path <SAVE_PATH> If it is set then the result will be saved here, otherwise it will not be saved. [default: None]
-o, --output <OUTPUT> If it is set then the result will be saved here, otherwise it will not be saved. [default: None]
-f, --save-format <SAVE_FORMAT> The format in which the image will be saved [default: png]
-h, --help Print help
-V, --version Print version
Expand Down
3 changes: 2 additions & 1 deletion crates/sss_code/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<PathBuf>,
pub output: Option<PathBuf>,
#[clap(
long,
short = 'f',
Expand Down
2 changes: 1 addition & 1 deletion crates/sss_code/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit c207b50

Please sign in to comment.