Yaap
Yaap is a straight up port of python venerable tqdm to .NET / CLR
Yaap stands for Yet Another ANSI Progressbar
Feel free to browse some of the articles like the Getting Started page, FAQ or figure out how to get the best looking progress bar under Windows, alternatively consule the API docs
What does it do
Much like in python, Yaap can make .NET loops, IEnumerable
s and more show a smart progress meter.
Here's what Yaap's own Demo looks like:
using static Yaap.YaapConsole;
using static Enumerable;
...
foreach (var i in Range(0, 200).Yaap(settings:
new YaapSettings {Description = "regular", Width = 100})) {
Thread.Sleep(100);
switch (i) {
case 50: WriteLine("The (re)drawing of the progress bar, happens in the background"); break;
case 100: Write("As long as you use YaapConsole.Write* methods...."); break;
case 150: WriteLine(" ... you can continue writing to the terminal"); break;
}
}
What is a Yaap made of
What Else
Yaap has the following features:
Feature | Blurb |
---|---|
Easy wrapping of IEnumerable<T> with a Yaap progress bar |
foreach (var i in Enumerable.Range(0, 1000).Yaap()) { } |
Manual (non IEnumerable<T> ) progress updates |
var y = new Yaap(100); y.progress = 99; |
Low latency (~30ns) on enumeration | Generally speaking, everything happens in background thread, and the enumeration is un-hindered Checkout the benchmarks |
Zero allocation (post construction) | What can I say, I just really hate alloactions Checkout the benchmarks |
Full progress bar with smooth unicode and numeric progress, time and rate | Yaap will detect unicode support and will opt to use the default unicode block charchter based theme, but you can use additional unicode themes using the provided BarStyle enumeration if you are a special snowflakeWhen unicode is not supported by the terminal, we us the plain ole' # char |
Elapsed time tracking / Total Time Prediction | Yaap will time the elapsed time and predict the remaining time |
No-Embarrassment guarantee or your money back** |
Yaap will never make you lose face with showing embarrassing things like 101% completion, or having the elapsed time go past the predicted time (Instead we'll keep changing the predicted time!) |
Rate Prediction | Uses advanced machine learning to predict total estimated time (team available for acquihire)1 1 OK, I lied, Just using Kalman filters effectively instead |
Metric Abbreviation for counts (K/M/G...) | Yaap can automatically use metric units (K /M /G ) |
Nested / Multiple concurrent progress bars | Yaap will automatically detect nested progress bars with no extra effort on your part |
Colors | Yaap can do normal 16 color palette or force TrueColor in case someone redifined yellow in their infinite wisdom |
Butter Smooth Progress bars | Yaap can predict progress from rate, allowing smooth progress bars, even on slow/choppy enumeration |
Butter Smooth Nested Progress bars | Yaap can estimate progress in higher level loops from the progress of their sub-loops(!) |
Yaap will NEVER .Count() your IEnumerable |
Yaap never calls .Count() . It does other ungodly things to try and get your IEnumerable "length" in weird/undocumented ways, and when all fails, it will miserably fail, asking you to provide the Total value anagrammatically |
Turn elements on/off | |
Works on Windows | But you have to work for it, at least bit |
Dynamic Resizing | |
Constant Width |