Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Progbar Documentation Fixes #12

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
2 changes: 1 addition & 1 deletion zung_mini/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zung_mini"
version = "0.2.0"
version = "0.2.1"
edition = "2021"
authors = ["Ishaan Goel <[email protected]>"]
description = "Mini rust projects that target specific features of rust"
Expand Down
8 changes: 8 additions & 0 deletions zung_mini/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
Expand Down
2 changes: 1 addition & 1 deletion zung_mini/src/progbar/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading