From 6fe312e468d5bd6d4e0f632e1ffeac887f5e64b6 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 3 May 2020 14:50:10 +0200 Subject: [PATCH 1/3] added pacman style progressbar --- alive_progress/styles/internal.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/alive_progress/styles/internal.py b/alive_progress/styles/internal.py index 8787c29..7b1381e 100644 --- a/alive_progress/styles/internal.py +++ b/alive_progress/styles/internal.py @@ -108,10 +108,11 @@ def __create_bars(): solid = standard_bar_factory(chars='■', borders='<>', tip='►', errors='⚠✗') checks = standard_bar_factory(chars='✓', tip='', errors='⚠✗') filling = standard_bar_factory(chars='▁▂▃▄▅▆▇█', tip=None, errors='⚠✗') + pacman = standard_bar_factory(chars='Cc-', background=" o", borders="[]", tip=None, errors='⚠✗') result = {k: v for k, v in locals().items() if not k.startswith('_')} desired_order = 'classic classic2 smooth blocks bubbles circles hollow squares solid checks ' \ - 'filling'.split() + 'filling pacman'.split() return _wrap_ordered(result, desired_order) From 106da86d90ed55374cc6eefa36ca4463e695755b Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 3 May 2020 14:53:33 +0200 Subject: [PATCH 2/3] added demo file --- demo.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 demo.py diff --git a/demo.py b/demo.py new file mode 100644 index 0000000..95e1be5 --- /dev/null +++ b/demo.py @@ -0,0 +1,4 @@ +from alive_progress import alive_bar, showtime, show_bars + +# it's showtime baby! +show_bars() From df8bf4aad31ddf6ce51e2a1f4908ad7f9d3e1789 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 3 May 2020 14:55:12 +0200 Subject: [PATCH 3/3] fixed bug: can't multiply sequence by non-int --- alive_progress/animations/bars.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alive_progress/animations/bars.py b/alive_progress/animations/bars.py index d99d6ee..7939bb2 100644 --- a/alive_progress/animations/bars.py +++ b/alive_progress/animations/bars.py @@ -28,7 +28,7 @@ def draw_bar(percent, end=False): return draw_bar.left_border + bar + (draw_bar.right_border if right else '') virtual_length = length * len(chars) - padding = background * math.ceil((length - len(tip)) / len(background)) + padding = background * int(math.ceil((length - len(tip)) / len(background))) blanks = ' ' * (length - len(tip)) draw_bar.left_border, draw_bar.right_border = borders