rsalmei / alive-progress

A new kind of Progress Bar, with real-time throughput, ETA, and very cool animations!
MIT License
5.53k stars 206 forks source link

Request - display counters #71

Open thorntonjohn opened 3 years ago

thorntonjohn commented 3 years ago

It would be nice to add counters that could be incremented and displayed in the progress bar. For example:

with alive_bar(len(all_lines), counters["filtered", "success"]) as bar:
  ...
  if success:
    bar(counter="success")
  else if filtered:
    bar(counter="filtered")

|█████████████████████| 5530/5532 [90%] in 43.4s (127.43/s) success: 5000 filtered:530

rsalmei commented 3 years ago

Hey, I like the idea! It may take a while until I have time to, but I'll implement it 👍