question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Text under progress bar

See original GitHub issue

Wouldn’t it be nice if while the progress bar is running, right under it you had one line of text which gets updated with a custom message after each bar() call. Lets call this a “progress text bar”

For example:

   with alive_bar(total, progressTextBarTitle='Inserted in DB:') as bar:
       for item from data:
           # do some processing
           bar( progressText=item.text() )

Then you would get something like this: |██████████████ | 4130/5532 [67%] in 43.4s (127.43/s) [ Inserted in DB: license plate ZYZ-999 ]

… and it would be continuously updated just like the progress bar…

|██████████████ | 4131/5532 [68%] in 43.4s (127.43/s) [ Inserted in DB: license plate ABC-123 ]

… and so son.

So you pass the title for the progress text bar when declaring the alive_bar(), and for each bar() call, you pass it the text that will be displayed in the progress text bar, which is a continuously updated text bar right under the progress bar.

While the progress bar is running, right under it you get quickly updating texts explaining what it is doing. In this example, I would be updating a database, inserting items into it, with the progress text bar listing the titles of the elements I’m inserting into the database.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
rsalmeicommented, Mar 22, 2022

Hey @mmigliari, it’s published!! 2.4.0 brings this feature, I called it Dual Line Text Mode!

1reaction
rsalmeicommented, Mar 4, 2022

I’m glad you liked it. I’ll try to get back to it this weekend and release it.

You’re welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - How do I put text on ProgressBar? - Stack Overflow
Its working Fine. Now I am wondering how i can show some text inside progress bar control like "Initiating Registration" etc.Also I want...
Read more >
The Progress Indicator element - HTML - MDN Web Docs
The HTML element displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
Read more >
Progress Bar Component - Appian 21.4
Name Keyword Types Label label Text Instructions instructions Text Percentage percentage Number (Integer)
Read more >
text mode (terminal) progress bar / progressbar - the Tcler's Wiki!
It displays a fancy sliding bar for the user while a long running command is in progress. #Use on bourne/korn shell. # --...
Read more >
Progress bar - Carbon Design System
A progress bar provides feedback about the duration and progression of a process. ... Text alignment depends on the context and area given....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found