From ac44b6a5d0ffad0256c67dcb3fbc9a467729461c Mon Sep 17 00:00:00 2001 From: Ishaan Goel Date: Tue, 1 Oct 2024 12:42:55 +0530 Subject: [PATCH 1/3] doc: zung_mini probar - Cli documentation updated --- zung_mini/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zung_mini/src/lib.rs b/zung_mini/src/lib.rs index d780862..b37f718 100644 --- a/zung_mini/src/lib.rs +++ b/zung_mini/src/lib.rs @@ -29,20 +29,28 @@ enum MiniCommands { #[derive(Clone, Subcommand, Debug)] #[command(arg_required_else_help = true)] enum ProgBarCommands { + /// Runs the progbar on an simulated infinite loop. UnBounded { + /// Custom message to display along with the spinner. #[arg(short, long, default_value_t = String::from("Simulating Loading..."))] message: String, }, + + /// Runs the progbar on an simulated loop having len of iter_count. Bounded { + /// Custom starting delimiter for the loading bar. #[arg(long, default_value_t = String::from("["))] delim_start: String, + /// Custom ending delimiter for the loading bar. #[arg( long, default_value_t = String::from("]"))] delim_close: String, + /// Custom bar style. Each value specified will be repeated on each iteration. #[arg(long, default_value_t = String::from("#"))] bar_style: String, + /// Set custom length of the loop. #[arg(short, long, default_value_t = 50)] iter_count: u8, }, From 98ef2a939125a2c5aa91f48e1614834386c63ca9 Mon Sep 17 00:00:00 2001 From: Ishaan Goel Date: Tue, 1 Oct 2024 12:44:43 +0530 Subject: [PATCH 2/3] doc: zung_mini probar - Fixed docs based on updates to in 0.2.0 --- zung_mini/src/progbar/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zung_mini/src/progbar/mod.rs b/zung_mini/src/progbar/mod.rs index 18b28a5..1ba19f1 100644 --- a/zung_mini/src/progbar/mod.rs +++ b/zung_mini/src/progbar/mod.rs @@ -41,7 +41,7 @@ //! //! The output will look something like this in the terminal as the progress bar updates: //! ```text -//! ##### +//! ⠼ Loading... //! ``` //! //! ## Bounded Progress Bar with Custom Delimiters From 72045c078a683403bac3671d8456fccb18e742a3 Mon Sep 17 00:00:00 2001 From: Ishaan Goel Date: Tue, 1 Oct 2024 12:46:44 +0530 Subject: [PATCH 3/3] version bump --- Cargo.toml | 2 +- zung_mini/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 80f5f32..00a262d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,6 @@ members = ["zung_mini"] resolver = "2" [dependencies] -zung_mini = { version = "0.2.0", path = "./zung_mini" } +zung_mini = { version = "0.2.1", path = "./zung_mini" } anstyle = "1.0.8" clap = { version = "4.5.18", features = ["derive"] } diff --git a/zung_mini/Cargo.toml b/zung_mini/Cargo.toml index c1196f8..4cbadb6 100644 --- a/zung_mini/Cargo.toml +++ b/zung_mini/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "zung_mini" -version = "0.2.0" +version = "0.2.1" edition = "2021" authors = ["Ishaan Goel "] description = "Mini rust projects that target specific features of rust"