From c5969eefe41e6dfbdea2ee6303d56e990662eaff Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 17 Dec 2019 21:41:44 -0600 Subject: [PATCH 1/2] Update README.md --- README.md | 30 +++++------------------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 14536bf..7849486 100644 --- a/README.md +++ b/README.md @@ -34,31 +34,7 @@ # Progress bar -To introduce a progress bar in your application, include `indicators/progress_bar.hpp` and create a `ProgressBar` object. - -```cpp -#include - -int main() { - indicators::ProgressBar bar; - - // Configure the bar - bar.set_bar_width(50); - bar.start_bar_with("["); - bar.fill_bar_progress_with("="); - bar.lead_bar_progress_with(">"); - bar.fill_bar_remainder_with(" "); - bar.end_bar_with("]"); - bar.set_postfix_text("Getting started"); - bar.set_foreground_color(indicators::Color::GREEN); - - // Update bar state - - return 0; -} -``` - -Here's the general structure of a progress bar: +To introduce a progress bar in your application, include `indicators/progress_bar.hpp` and create a `ProgressBar` object. Here's the general structure of a progress bar: ``` {prefix} {start} {fill} {lead} {remaining} {end} {percentage} [{elapsed}<{remaining}] {postfix} @@ -73,6 +49,10 @@ From application-level code, there are two ways in which you can update this pro You can update the progress bar using `bar.tick()` which increments progress by exactly `1%`. +

+ +

+ ```cpp #include #include From 5449ad06299582958c566dc5e50208891188eb32 Mon Sep 17 00:00:00 2001 From: Pranav Date: Tue, 17 Dec 2019 21:49:37 -0600 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7849486..a96f654 100644 --- a/README.md +++ b/README.md @@ -68,7 +68,7 @@ int main() { bar.lead_bar_progress_with(">"); bar.fill_bar_remainder_with(" "); bar.end_bar_with("]"); - bar.set_postfix_text("Getting started"); + bar.set_postfix_text("Extracting Archive"); bar.set_foreground_color(indicators::Color::GREEN); // Update bar state