nercone-modern 1.8.0__py3-none-any.whl → 1.9.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,7 +16,7 @@ class ModernProgressBar:
16
16
  _last_rendered = False
17
17
  _lock = threading.RLock()
18
18
 
19
- def __init__(self, total: int, process_name: str, spinner_mode: bool = False, primary_color: str = "blue", secondary_color: str = "white", box_color: str = "blue", box_left: str = "[", box_right: str = "]"):
19
+ def __init__(self, total: int, process_name: str, spinner_mode: bool = False, primary_color: str = "blue", secondary_color: str = "white", box_color: str = "white", box_left: str = "[", box_right: str = "]", show_bar: bool = True, bar_color: str = "blue"):
20
20
  self.total = total
21
21
  self.process_name = process_name.strip()
22
22
  self.spinner_mode = spinner_mode
@@ -25,6 +25,8 @@ class ModernProgressBar:
25
25
  self.box_color = box_color
26
26
  self.box_left = box_left
27
27
  self.box_right = box_right
28
+ self.show_bar = show_bar
29
+ self.bar_color = bar_color
28
30
  self.current = 0
29
31
  self.index = len(ModernProgressBar._active_bars)
30
32
  ModernProgressBar._active_bars.append(self)
@@ -145,7 +147,7 @@ class ModernProgressBar:
145
147
  status = f"{self.box_left}{' ' * total_width}/{' ' * total_width}{self.box_right} "
146
148
  else:
147
149
  status = f"{self.box_left}{self.current:>{total_width}}/{self.total}{self.box_right} "
148
- line = f"{ModernColor.color(self.box_color)}{self.box_left}{ModernColor.color('reset')}{ModernColor.color('gray')}{bar}{ModernColor.color('reset')}{ModernColor.color(self.box_color)}{self.box_right}{ModernColor.color('reset')} {ModernColor.color(self.primary_color)}{proc_name}{ModernColor.color('reset')} {percentage_alt if self.spinner_mode else percentage} {status}{ModernColor.color(self.primary_color)}|{ModernColor.color('reset')} {self.message}"
150
+ line = f"{ModernColor.color(self.bar_color)}{'| ' if self.show_bar else ''}{ModernColor.color('reset')}{ModernColor.color(self.box_color)}{self.box_left}{ModernColor.color('reset')}{ModernColor.color('gray')}{bar}{ModernColor.color('reset')}{ModernColor.color(self.box_color)}{self.box_right}{ModernColor.color('reset')} {ModernColor.color(self.primary_color)}{proc_name}{ModernColor.color('reset')} {percentage_alt if self.spinner_mode else percentage} {status}{ModernColor.color(self.primary_color)}|{ModernColor.color('reset')} {self.message}"
149
151
  total_move_up = self.log_lines + (len(ModernProgressBar._active_bars) - self.index)
150
152
  if total_move_up > 0:
151
153
  sys.stdout.write(f"\033[{total_move_up}A")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nercone-modern
3
- Version: 1.8.0
3
+ Version: 1.9.0
4
4
  Summary: Modern CLI Library
5
5
  Author: Nercone
6
6
  Author-email: Nercone <nercone@diamondgotcat.net>
@@ -2,8 +2,8 @@ nercone_modern/__init__.py,sha256=ArF3T8FdWIhwGcL4MfYcHqMse3n5gjuyzbLNlcqRcxs,44
2
2
  nercone_modern/__main__.py,sha256=tiCwzvs4N0J9_vFoA7eaQqkSIhVcDxUQ9uLPNeSQVWo,2475
3
3
  nercone_modern/color.py,sha256=e2P9WXeGosHLCAasdE7IQW29GPZOVDMLsUCsLj6hBkM,1268
4
4
  nercone_modern/logging.py,sha256=61ixjR37-ewS1RUwnNZnkNGQEBazhiSJJv5g-rLq834,10158
5
- nercone_modern/progressbar.py,sha256=ohfLTOVPUD9LyvF5AcxtlLqXs0uYO3gUGL9ii8RkZ7E,8504
5
+ nercone_modern/progressbar.py,sha256=0D03p-w6VtSTl130JaB9S3dhkl72I2c-wqlhxUry32E,8715
6
6
  nercone_modern/text.py,sha256=eGxGQOJ3b-783ocLibkG62cOcYD4HLG_3diA52tU8jI,1031
7
- nercone_modern-1.8.0.dist-info/WHEEL,sha256=w4ZtLaDgMAZW2MMZZwtH8zENekoQYBCeullI-zsXJQk,78
8
- nercone_modern-1.8.0.dist-info/METADATA,sha256=lJcU9MrME8qmxGj6nPrpUEa-nikXdpOp5AvGhwYjISA,6127
9
- nercone_modern-1.8.0.dist-info/RECORD,,
7
+ nercone_modern-1.9.0.dist-info/WHEEL,sha256=w4ZtLaDgMAZW2MMZZwtH8zENekoQYBCeullI-zsXJQk,78
8
+ nercone_modern-1.9.0.dist-info/METADATA,sha256=yJpw-bMnOH_f6CNcleSbXhzDtM4V5oehXCUQNPzeoUA,6127
9
+ nercone_modern-1.9.0.dist-info/RECORD,,