diff --git a/README.md b/README.md
index 05d1a98..d9b16d9 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,6 @@
+
-
+
Yet Another Spinner Lib
Upgrade your Rust CLIs with 100+ spinner animations, progress bars, and multiline support, plus user input validation, logging, and automatic requirement checks
@@ -17,17 +18,24 @@
+
+
-
-
-
-
+## Table of Contents
-
+- [Overview](#overview)
+- [How to Use?](#how-to-use)
+- [Documentation](#documentation)
+- [Examples](#examples)
+- [Contributing](#contributing)
+- [Preview](#preview)
+- [Disclaimer](#disclaimer)
+- [Credits](#credits)
+- [License](#license)
-
+## Overview
Do you often find yourself gazing into the void of your terminal,
wondering if your computer has decided to take a coffee break without notifying you?
@@ -39,7 +47,7 @@ wondering if your computer has decided to take a coffee break without notifying
## How to Use?
It's as easy as pie (or maybe even easier, depending on your pie-making skills)!
-Follow these simple steps:
+Follow these steps:
````shell
cargo add zenity
@@ -69,9 +77,8 @@ fn main() {
check out the examples for more
-**NOTE:**
-
-- the lib already includes checks for `--color` following the conventions
+> [!NOTE]
+> the lib already includes checks for `--color` following the conventions
by:
[Rain's Rust CLI recommendations](https://rust-cli-recommendations.sunshowers.io/colors.html#general-recommendations)
@@ -110,6 +117,14 @@ If you find this project helpful or enjoyable, consider giving it a star on [Git
Thank you for your interest and contributions!
+## Preview
+
+
+
+
+
+
+
## Disclaimer
Now, we won't promise you that cli_loading_magic will solve all your problems.
diff --git a/examples/multi_spinner.rs b/examples/multi_spinner.rs
index e764a70..7f4d6fc 100644
--- a/examples/multi_spinner.rs
+++ b/examples/multi_spinner.rs
@@ -8,72 +8,69 @@ use zenity::spinner::MultiSpinner;
use zenity::style::{Color, StyledString};
fn main() {
- {
- let check_mark_text = check_mark_button();
- let cross_mark_text = cross_mark();
+ let check_mark_text = check_mark_button();
+ let cross_mark_text = cross_mark();
- let spinner = MultiSpinner::default();
- let spinner1 = spinner.get_last();
+ let spinner = MultiSpinner::default();
+ spinner.clear(Some(1));
+ let spinner1 = spinner.get_last();
- // main thread operations
- let spinner2 = spinner.add(Frames::wavy());
- let spinner3 = spinner.add(Frames::dot_spinner9());
- let spinner4 = spinner.add(Frames::dot_spinner8());
+ // main thread operations
+ let spinner2 = spinner.add(Frames::wavy());
+ let spinner3 = spinner.add(Frames::dot_spinner9());
+ let spinner4 = spinner.add(Frames::dot_spinner8());
- spinner.run_all();
+ spinner.run_all();
- sleep(Duration::from_secs(4));
- spinner.set_text(&spinner2, "spinner2".to_string());
- // stop spinner1
- spinner.set_styled_text(
- &spinner1,
- StyledString::simple("spinner1", Some(Color::Blue), Some(Color::DarkBlue), None),
- );
+ sleep(Duration::from_secs(4));
+ spinner.set_text(&spinner2, "spinner2".to_string());
+ // stop spinner1
+ spinner.set_styled_text(
+ &spinner1,
+ StyledString::simple("spinner1", Some(Color::Blue), Some(Color::DarkBlue), None),
+ );
- sleep(Duration::from_secs(2));
+ sleep(Duration::from_secs(2));
- spinner.stop(&spinner2);
- spinner.set_styled_text(
- &spinner2,
- StyledString::simple(
- &format!("{} Successfully", &check_mark_text),
- Some(Color::Green),
- None,
- None,
- ),
- );
+ spinner.stop(&spinner2);
+ spinner.set_styled_text(
+ &spinner2,
+ StyledString::simple(
+ &format!("{} Successfully", &check_mark_text),
+ Some(Color::Green),
+ None,
+ None,
+ ),
+ );
- sleep(Duration::from_secs(2));
- spinner.set_text(&spinner1, "spinner1 stopped".to_string());
- spinner.stop(&spinner1);
+ sleep(Duration::from_secs(2));
+ spinner.set_text(&spinner1, "spinner1 stopped".to_string());
+ spinner.stop(&spinner1);
- spinner.show_line_number();
+ spinner.show_line_number();
- sleep(Duration::from_secs(9));
- spinner.stop(&spinner3);
- spinner.stop(&spinner4);
+ sleep(Duration::from_secs(9));
+ spinner.stop(&spinner3);
+ spinner.stop(&spinner4);
- spinner.set_styled_text(
- &spinner3,
- StyledString::simple(
- &format!("{} Failed!", &cross_mark_text),
- Some(Color::Red),
- None,
- None,
- ),
- );
- spinner.set_styled_text(
- &spinner4,
- StyledString::simple(
- &format!("{} Failed!", &cross_mark_text),
- Some(Color::Red),
- None,
- None,
- ),
- );
+ spinner.set_styled_text(
+ &spinner3,
+ StyledString::simple(
+ &format!("{} Failed!", &cross_mark_text),
+ Some(Color::Red),
+ None,
+ None,
+ ),
+ );
+ spinner.set_styled_text(
+ &spinner4,
+ StyledString::simple(
+ &format!("{} Failed!", &cross_mark_text),
+ Some(Color::Red),
+ None,
+ None,
+ ),
+ );
- sleep(Duration::from_secs(1));
- }
-
- sleep(Duration::from_secs(5));
+ sleep(Duration::from_secs(1));
}
diff --git a/images/ZENITY.svg b/images/ZENITY.svg
index 1c17220..c7136cc 100644
--- a/images/ZENITY.svg
+++ b/images/ZENITY.svg
@@ -1,3 +1,6 @@
+
+
+