Skip to content

mecolosimo/progressbar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

progressbar

Progressbar in V based on progressbar by Trevor Fountain and Johannes Buchner.

What is this thing?

progressbar is for displaying attractive progress bars on the command line. It's heavily influenced by the ruby ProgressBar gem, whose api and behaviour it imitates. Really want something like tqdm. But this was simpler. It waits until 0.5% is done to try and calculate the remaining time. It then might quit if over 99 days, 59 min, 59 secs.

Example usage:

import time
import progressbar as prog

fn main() {
	mut p := prog.progressbar_new("Testing", 100) or { panic('Something went wrong with progressbar_new')}
	for i := 0; i < 100; i++ {
		// Simulating doing some stuff
		time.sleep(1 * time.second)
		p.progressbar_inc()
	}
	p.progressbar_finish()
}

installing

Eventually, I will put this in vpm but for now:

v install https://github.com/mecolosimo/progressbar.git

About

Progressbar in V

Resources

License

BSD-3-Clause, BSD-3-Clause licenses found

Licenses found

BSD-3-Clause
LICENSE
BSD-3-Clause
LICENSE-c

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published