I need to implement a progress bar for a long-term project I’m working on, but I decided to have fun with it by making the bars a little snazzy.
If you’re looking for terminal amenities, you’re better off with something like Term.jl, but you can find my project on GitHub, too. (Not to be confused with ProgressBars.jl)
Happy to hear feedback! Mostly just wanted to share how much fun this was, though.
I will preemptively address a couple of things:
Yes, it assumes the terminal is at least 80 characters wide. This is good enough for me and my purposes!
Yes, I could pre-cache the bar for each progress percentage, but this only makes a significant difference for really fast progress, which is when you care about a progress bar the least.
That is a cool project @mcmuffin6o , thanks for sharing. You are probably aware of ProgressMeter.jl, but worth sharing the link here anyways.
One thing that ProgressMeter.jl supports that I really like is progress bars for parallel processes. Perhaps that is another challenge you can tackle for fun.
Also, the ProgressLogging.jl package defines an interface for such progress bar implementations. I understand that you can use these progress bars in Pluto.jl and elsewhere if you adopt the interface.
Just as a tip, you don’t have to do it this way if you don’t want: displaysize is in the default namespace, and _, cols = displaysize() will get you the actual value. Your choice!.