| Crates.io | prgrs |
| lib.rs | prgrs |
| version | 0.6.4 |
| created_at | 2020-02-20 22:54:09.941025+00 |
| updated_at | 2020-09-08 18:34:45.740753+00 |
| description | prgrs is a progress bar for rust, that aims to work like the python package tqdm |
| homepage | |
| repository | https://github.com/phil0x2e/prgrs/ |
| max_upload_size | |
| id | 211032 |
| size | 13,130 |
prgrs is a simple progress bar for rust, that aims to work like the python package tqdm.
It is a small library with just a single dependency.
prgrs should work for almost any linux terminal emulator. Windows could work too, because terminal supports windows but I haven't tested yet, so please let me know if you have.
Have a look at the Documentation.
Please use Version 0.6.0 or higher, the older versions only work correctly with a small amount of terminals.
use prgrs::{Prgrs, writeln};
use std::{thread, time};
fn main() {
for i in Prgrs::new(0..1000, 1000) {
thread::sleep(time::Duration::from_millis(10));
if i % 10 == 0{
let str = format!("{}", i);
writeln(&str).expect("prgrs::writeln: Some Problem occured while trying to print");
}
}
}
The output will look something like this:
[############## ] ( 42%)