Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple line progress bar #134

Closed
shadowrylander opened this issue Feb 5, 2022 · 11 comments
Closed

Simple line progress bar #134

shadowrylander opened this issue Feb 5, 2022 · 11 comments

Comments

@shadowrylander
Copy link

Hello!

Is it possible to have a simple line progress bar, similar to the rich progress bar? I feel your package here is more fluid, but a little too much for me.

Thank you kindly for the help, and thanks for the package! 😸

@rsalmei rsalmei added the feature request No promises... label Feb 6, 2022
@rsalmei
Copy link
Owner

rsalmei commented Feb 6, 2022

Hello!

I only support disabling segments at the moment, like the monitor and stats and elapsed time...
But it is a long-standing request, I can surely implement that!

I'm doing it actually, to allow us to customize any of those segments as you wish!
Stay tuned... Very soon! 😉

@shadowrylander
Copy link
Author

Eee! Thank you! 😹 Although, to clarify, I think I wanted a thin progression line, actually! 😅 The stats are quite handy!

@rsalmei
Copy link
Owner

rsalmei commented Feb 7, 2022

Ok, what did you mean by "thin" then?
My alive-progress shows lines by default like this:

|████████████████                        | ▅▃▁ 44/110 [40%] in 5s (9.4/s, eta: 7s)

The one you've mentioned seems to only show 40% (without 44/110), and only elapsed time, without any stats.
So, I thought you've wanted to change the monitor to only a percent, and disable stats, this is already possible. So I was just missing the custom monitor, to use {percent:.0%} instead of my default '{count}/{total} [{percent:.0%}]'.
What didn't I understand?

@shadowrylander
Copy link
Author

Sorry about that; these example from rich are what I meant:
https://raw.githubusercontent.com/Textualize/rich/master/imgs/progress.gif
https://raw.githubusercontent.com/Textualize/rich/master/imgs/downloader.gif

Literally thin progress "lines", instead of the thicker progress "bars".

@rsalmei
Copy link
Owner

rsalmei commented Feb 7, 2022

Ohhhh I see... 😂
I've understood "thin" as leaner, simpler info, so I thought you've wanted to slim down some of the plentiful info I have!
Not as an actually narrower progress bar! 😂

But in that case, you can simply create a custom bar, which is super easy!
Untitled

There's also the awesome check tool, where you get to see your creation!
image

Pass a number to choose a variety of options, including animations!
Untitled

Does that work for you? 😄

@rsalmei
Copy link
Owner

rsalmei commented Feb 7, 2022

Oh, forgot to say, if you want to remove even the borders, you can pass borders=' ' (two spaces).
The bar_factory supports a plethora of options, get creative!!

Untitled

    Args:
        chars (Optional[str]): the sequence of increasing glyphs to fill the bar
            can be None for a transparent fill, unless tip is also None.
        tip (Optional[str): the tip in front of the bar
            can be None, unless chars is also None.
        background (Optional[str]): the pattern to be used underneath the bar
        borders (Optional[Union[str, Tuple[str, str]]): the pattern or patterns to be used
            before and after the bar
        errors (Optional[Union[str, Tuple[str, str]]): the pattern or patterns to be used
            when an underflow or overflow occurs

@shadowrylander
Copy link
Author

Hah! That's what I was looking for! Thanks! 😻😹 Er, any way to color them...? 😅

@TheTechRobo
Copy link
Contributor

you might yuse ansui escape codes

@rsalmei
Copy link
Owner

rsalmei commented Feb 7, 2022

You're welcome! 👍
No, not at the moment. Since I do herculean work to try to fit animations within a terminal line, even when the user resizes the terminal or in the presence of grapheme clusters (emoji), any color codes would wreck the length assumptions (they are invisible chars).
But someday I might support it, who knows 🙂

@rsalmei rsalmei closed this as completed Feb 7, 2022
@rsalmei rsalmei removed the feature request No promises... label Feb 7, 2022
@rsalmei
Copy link
Owner

rsalmei commented Feb 7, 2022

Read my comments here: #49

@shadowrylander
Copy link
Author

@rsalmei Got it! Thanks for all the help!
@TheTechRobo Issue 49 is the key! ... Or the lock! 😹

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants