rsalmei / alive-progress

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

Is it possible to make the progress bar reverse? #258

Closed Itzamna44 closed 9 months ago

Itzamna44 commented 9 months ago

Hello. How to make progress bar decrease from right to left (from 100% to 0)? I can't find how to configure it. Can You help me?

rsalmei commented 9 months ago

Hi, Yeah, it is simple enough and doesn't need any configuration, you can make it with manual mode:

with alive_bar(manual=True) as bar:
    for i in range(1000):
        time.sleep(0.005)
        bar(1-i/1000)

https://github.com/rsalmei/alive-progress/assets/6652853/9fb49e19-4995-49be-a5a9-191d8e9f9879

Itzamna44 commented 9 months ago

Thanks. This works exactly as I expected.

rsalmei commented 9 months ago

You're welcome!