Closed InfernalPlank closed 4 years ago
@rsalmei
Hello @RHQ-Rusty, I will help you.
But I fail to see any problem in your image, what do you think is it happening? You say in the title of the issue that alive-bar is "always at 41%", but in the image I can clearly see the percentage is increasing, from 48% to 59%.
You shouldn't put a \n
in the bar(text=...)
, as the bar will get replicated in the screen.
Maybe I should even filter text, to not allow any CR in there...
@rsalmei So I need to remove that? The problem I am having is that the progress bar is duplicating and running down the screen; to fix that all I need to do is remove the '\n'? If so, I fail to see how this would fix it, as the first "positive" scan (the one returning '\n' into the bar) is at 80; the error begins occuring @ 40 ish.
Yeah, you should remove it anyway. The text
param is specific to display what you're doing in that iteration, something transient, like "Searching abc".
When you find what you need, just print
any way you want, including \n
.
Well, if it starts at 40%, it probably is hitting the end of screen, when the shell itself makes the cursor go down. Please try to increase the screen width, or sending to alive_bar: length=30
.
@rsalmei changing length=
worked; I didn't even have one set initially, but 30 works wonderfully! Is there another workaround for this that dynamically scales to terminal size?
Great, I'm glad it worked! Not yet, there's even an issue open for that (#19), but I didn't have time to take that yet. I was very busy with another open-source project of mine: https://github.com/rsalmei/clearly, and I work on them all alone...
All good man, take your time! Your contributions to the open-source community are duly noted and highly regarded; thanks for taking some time to reply! I believe Issue #19 is indeed what I am experiencing. The comments OP on that issue provided may work as a temporary fix. Thank you!
Thanks man! You're welcome 👍
Hey @RHQ-Rusty, I've just protected against that \n in text! 😜
See my Code Here:
See my Problem Here:
I genuinely have no idea why this is happening or what is causing it; any assistance would be highly appreciated.
Cheers.