rBar

This is just a simple customizable loading bar that scales to the size of your terminal and has the ability to print a message

Details

The current version is 0.2.0

getbarcolor

Takes one argument, color and converts it into an ansi escape sequence,

The supported colors are: black, red, green, yellow, blue, magenta, cyan, & white

Anything else will result in the default terminal color

BarConf

draw_bar

The arguments are: percentage, message, messagebefore, barconfig

Example:

``` use rbar; use std::{thread, time};

// this example makes a loading bar similar to the one used by cargo fn main() { for i in 0..100 { let bar = rbar::BarConf { color: rbar::getbarcolor("default"), chars: ['[','=','>','-',']'] };

rbar::draw_bar(i, "Loading...", false, bar);
thread::sleep(time::Duration::from_millis(100));

} } Output: [=>--------------------------------] 1% Loading... A little later... [==================================] 100% Loading... ```