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

Customize the 'on x:' prefix message from print statements (header?) #251

Closed L0Lock closed 1 year ago

L0Lock commented 1 year ago

Scenario: I'm using alive-progress to make a somewhat user-friendly file processer. Right now the output looks like this:

image

It looks cool for the progress bar and the file-printing part. BUT, i'd love to be able to change the print statements prefix added by alive-progress:

I.E. in my case if i was able to do something like bar.header = (f"File {(:d+1):03} : ")

It's only some small quality of life of course, nothing showstopper x)

rsalmei commented 1 year ago

I could do something like that, but in your case you could just turn this enrichment off and do your own. Just set enrich_print=False and you're good to go, no "on X: " headers will be printed, and you can insert your own. Wouldn't that work better for you?

rsalmei commented 1 year ago

Ok, closing this one. Feel free to reply here if you need anything else.