1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//! This crate allows you to display progress bar in a terminal.
//! 
//! # Example
//! 
//! ```
//! use progress_bar::progress_bar::ProgressBar;
//! use progress_bar::color::{Color, Style};
//! use std::{thread, time};
//! 
//! // if you have 81 pages to load
//! let mut progress_bar = ProgressBar::new(81);
//! progress_bar.set_action("Loading", Color::Blue, Style::Bold);
//!
//! for i in 0..81 {
//!     // load page
//!     thread::sleep(time::Duration::from_millis(500));
//!
//!     // log the result
//!     if i == 14 {
//!         progress_bar.print_info("Failed", "https://zefzef.zef", Color::Red, Style::Normal);
//!     } else if i == 41 {
//!        rogress_bar.print_info("Success", "https://example.com", Color::Green, Style::Bold);
//!     }
//!     
//!     // update the progression by 1
//!     progress_bar.inc();
//! }
//! ```
//! 
//! ![image showing the output of the code above](https://mubelotix.dev/images/progress_bar_example1.png "Output")

pub mod progress_bar;
pub mod color;