diff --git a/slpkg/multi_process.py b/slpkg/multi_process.py index 4f308083..dcdccad1 100644 --- a/slpkg/multi_process.py +++ b/slpkg/multi_process.py @@ -4,6 +4,7 @@ import subprocess from multiprocessing import Process +from slpkg.views.asciibox import AsciiBox from slpkg.configs import Configs from slpkg.utilities import Utilities from slpkg.progress_bar import ProgressBar @@ -16,6 +17,7 @@ class MultiProcess(Configs): self.utils = Utilities() self.progress = ProgressBar() + self.ascii = AsciiBox() self.stderr = None self.stdout = None @@ -26,13 +28,15 @@ class MultiProcess(Configs): def process(self, command: str, filename: str, process_message: str, progress_message: str) -> None: """ Starting multiprocessing install/upgrade process. """ if self.silent_mode and not self.option_for_no_silent: - done: str = f"{'':>1}{self.byellow}Done{self.endc}" + done: str = f"{'':>1}{self.yellow}Done{self.endc}" self.stderr = subprocess.DEVNULL self.stdout = subprocess.DEVNULL # Starting multiprocessing p1 = Process(target=self.utils.process, args=(command, self.stderr, self.stdout)) - p2 = Process(target=self.progress.progress_bar, args=(f'- {progress_message}:', filename)) + p2 = Process(target=self.progress.progress_bar, args=( + f"{'':>2}{self.bold}{self.ascii.bullet} {progress_message}:", filename) + ) p1.start() p2.start() diff --git a/slpkg/remove_packages.py b/slpkg/remove_packages.py index e36393ab..bc873999 100644 --- a/slpkg/remove_packages.py +++ b/slpkg/remove_packages.py @@ -88,7 +88,7 @@ class RemovePackages(Configs): command: str = f'{self.removepkg} {package}' name: str = self.utils.split_package(package)['name'] process_message: str = f"package '{name}' to remove" - progress_message: str = f'{self.bold}{self.red}Remove{self.endc}' + progress_message: str = f'{self.bold}{self.red}Removing{self.endc}' dependencies: list = self.is_dependency(name) if dependencies: @@ -117,7 +117,7 @@ class RemovePackages(Configs): print() def view_warning_message(self, dependencies: list, name: str) -> None: - print(f"\n{self.bold}{self.violet}WARNING!{self.endc}: The package '{self.red}{name}{self.endc}' " + print(f"\n{'':>4}{self.bold}{self.violet}WARNING!{self.endc}: The package '{self.red}{name}{self.endc}' " f"is a dependency for the packages:") for dependency in dependencies: print(f"{self.cyan:>16}-> {dependency}{self.endc}") diff --git a/slpkg/views/asciibox.py b/slpkg/views/asciibox.py index bd7e6080..54d9c680 100644 --- a/slpkg/views/asciibox.py +++ b/slpkg/views/asciibox.py @@ -19,6 +19,7 @@ class AsciiBox(Configs): if self.package_alignment < 1: self.package_alignment = 1 + self.bullet: str = '-' self.vertical_line: str = '|' self.horizontal_line: str = '=' self.horizontal_vertical: str = '+' @@ -32,6 +33,7 @@ class AsciiBox(Configs): self.vertical_and_left: str = '+' if self.ascii_characters: + self.bullet: str = '•' self.vertical_line: str = '│' self.horizontal_line: str = '─' self.horizontal_vertical: str = '┼'