Very nice! I will add it to the Plugin Manager. Please consider adding a README.md and a LICENSE in the root level of the repo. See other script repos for reference, I recommend the Apache license like the mekkablue scripts have them too.
Update @HugoJ : I just created a pull request for avoiding code reduplication. Take a look at the loop structure. Ping me if you want to go through the code together.
Add a .txt to custom the order and description of the colors (like the βLabel Keyβ Plugin)
(For the moment, the user have to edit the .py to do that)
(Line 39 from 388) Iβm sure there is a way to code it in much less line.
You can check how functions work so you can avoid duplicate code.
Also, you could make something so that your progress bar fills up dynamically based on your percent value instead of relying on multiple if/elif statements.
Hereβs an example:
steps = 10
def make_bar(value):
bar = ''
for i in range(steps-1):
if i < value:
bar += 'β'
else:
bar += 'β'
return bar
for i in range(steps):
status_bar = make_bar(i)
print(status_bar)