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

Custom Loading Bar #3

Open
Bhupesh-V opened this issue Apr 4, 2020 · 8 comments
Open

Custom Loading Bar #3

Bhupesh-V opened this issue Apr 4, 2020 · 8 comments
Labels
beginner cli Issues & PRs related to defe CLI good first issue Good for newcomers

Comments

@Bhupesh-V
Copy link
Owner

A nice addition to the CLI would be for e.g a different colour of loading bar or emojis in progress bar

@Bhupesh-V Bhupesh-V added beginner cli Issues & PRs related to defe CLI good first issue Good for newcomers labels Apr 4, 2020
@thePlebDev
Copy link

is this still open?

@Bhupesh-V
Copy link
Owner Author

is this still open?

Yes, it is.
Make sure to discuss here about your ideas on how to do this

@jueyaye
Copy link

jueyaye commented Oct 4, 2020

I had a quick look through your project and it looks like you use tqdm for your progress bars currently:
https://github.com/Bhupesh-V/defe/blob/master/core/feedcore.py#L7
Going through the code for tqdm it seems liker there's an option to specify a colour when you call tqdm() here:
https://github.com/Bhupesh-V/defe/blob/master/core/feedcore.py#L43-L49

Depending on how you would like to implement it. I imagine it would be pretty simple to add functionality which would allow users to set the colours of the progress bar as part of a config file or as an argument for your current commands. Which sounds best to you?

@Bhupesh-V
Copy link
Owner Author

I had a quick look through your project and it looks like you use tqdm for your progress bars currently:
https://github.com/Bhupesh-V/defe/blob/master/core/feedcore.py#L7
Going through the code for tqdm it seems like there's an option to specify a color when you call tqdm() here:
https://github.com/Bhupesh-V/defe/blob/master/core/feedcore.py#L43-L49

Depending on how you would like to implement it. I imagine it would be pretty simple to add functionality that would allow users to set the colors of the progress bar as part of a config file or as an argument for your current commands. Which sounds best to you?
oo

That sounds great although I don't think we need to make it accessible to users to change colors.
Right now we can just maybe randomize colors on every feed lookup from an already set of defined colors.

What do you think?

@jueyaye
Copy link

jueyaye commented Oct 6, 2020

Yeah, very doable. I'll try and write up a PR for it. Not sure how you would do loading bar with emojis but maybe there are some other options using tqdm()

@jueyaye
Copy link

jueyaye commented Oct 18, 2020

Looks like we can use this option to customise the character used to complete the fill the meter.
https://github.com/tqdm/tqdm/blob/00dabd63d759a1cac5a32c86aa773ea68e8d8ddc/tqdm/std.py#L888-L890
I did a quick test with the 👍 emoji and this is the result:
image
Does this look like what you were after?

@Bhupesh-V
Copy link
Owner Author

Looks like we can use this option to customise the character used to complete the fill the meter.
https://github.com/tqdm/tqdm/blob/00dabd63d759a1cac5a32c86aa773ea68e8d8ddc/tqdm/std.py#L888-L890
I did a quick test with the emoji and this is the result:
image
Does this look like what you were after?

This exactly looks what I needed although thumbs up might annoy people 😅, we can use 📥 or 📩 to display progress what do you think?
Something like this, maybe
cli-color

@jueyaye
Copy link

jueyaye commented Oct 18, 2020

Ah I see, yeah definitely. I believe, that ascii option updates what's filled (usually smooth blocks), not sure if it there is a way to cleanly have it so only the last option is the emoji but I'll endeavour to find out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner cli Issues & PRs related to defe CLI good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants