Updated for colors

This commit is contained in:
Dimitris Zlatanidis 2024-03-21 18:46:42 +02:00
parent df24cdcc2f
commit 1d25f0e9fa
8 changed files with 13 additions and 14 deletions

View file

@ -81,7 +81,7 @@ class Packages(Configs):
self.dependencies.append(dependency) self.dependencies.append(dependency)
self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies)) self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies))
print(f'{self.yellow}{self.ascii.done}{self.endc}') print(f'{self.bgreen}{self.ascii.done}{self.endc}')
def add_dependencies_to_install_order(self) -> None: def add_dependencies_to_install_order(self) -> None:
self.install_order.extend(self.dependencies) self.install_order.extend(self.dependencies)
@ -118,7 +118,7 @@ class Packages(Configs):
installed_package: str = self.utils.is_package_installed(pkg) installed_package: str = self.utils.is_package_installed(pkg)
self.view.skipping_packages(installed_package) self.view.skipping_packages(installed_package)
print(f'{self.yellow}{self.ascii.done}{self.endc}') print(f'{self.bgreen}{self.ascii.done}{self.endc}')
self.download_the_binary_packages(packages) self.download_the_binary_packages(packages)
if self.gpg_verification: if self.gpg_verification:
self.gpg.verify(asc_files) self.gpg.verify(asc_files)

View file

@ -28,4 +28,4 @@ class Cleanings(Configs):
self.utils.remove_folder_if_exists(self.tmp_slpkg) self.utils.remove_folder_if_exists(self.tmp_slpkg)
self.utils.create_directory(self.build_path) self.utils.create_directory(self.build_path)
print(f'{self.byellow}Successfully cleared!{self.endc}\n') print(f'Successfully cleared!\n')

View file

@ -60,7 +60,7 @@ class DownloadOnly(Configs):
self.save_slackbuild_sources(pkg) self.save_slackbuild_sources(pkg)
self.copy_slackbuild_scripts(pkg) self.copy_slackbuild_scripts(pkg)
print(f'{self.yellow}{self.ascii.done}{self.endc}') print(f'{self.bgreen}{self.ascii.done}{self.endc}')
self.download_the_sources() self.download_the_sources()
elapsed_time: float = time.time() - start elapsed_time: float = time.time() - start

View file

@ -35,6 +35,6 @@ class GPGVerify(Configs):
print(f"{'':>2}Error {process.returncode}: {file.name}") print(f"{'':>2}Error {process.returncode}: {file.name}")
if exit_code == 0: if exit_code == 0:
print(f'{self.yellow}{self.ascii.done}{self.endc}') print(f'{self.bgreen}{self.ascii.done}{self.endc}')
elif exit_code != 0 and self.dialog: elif exit_code != 0 and self.dialog:
self.view.question() self.view.question()

View file

@ -46,7 +46,7 @@ class InstallData(Configs):
self.repos.last_update_json.write_text(json.dumps(last_update_json, indent=4)) self.repos.last_update_json.write_text(json.dumps(last_update_json, indent=4))
def view_done_message(self) -> None: def view_done_message(self) -> None:
print(f'{self.yellow}{self.ascii.done}{self.endc}\n') print(f'{self.bgreen}{self.ascii.done}{self.endc}\n')
def install_sbo_data(self) -> None: def install_sbo_data(self) -> None:
""" """

View file

@ -40,8 +40,8 @@ class MultiProcess(Configs):
None. None.
""" """
if self.silent_mode or self.option_for_silent: if self.silent_mode or self.option_for_silent:
done: str = f'{self.yellow}{self.ascii.done}{self.endc}' done: str = f'{self.bgreen}{self.ascii.done}{self.endc}'
failed: str = f'{self.red}{self.ascii.failed}{self.endc}' failed: str = f'{self.bred}{self.ascii.failed}{self.endc}'
# Starting multiprocessing # Starting multiprocessing
process_1 = Process(target=self.process_and_log, args=(command,)) process_1 = Process(target=self.process_and_log, args=(command,))

View file

@ -90,7 +90,7 @@ class Slackbuilds(Configs):
self.dependencies.append(dependency) self.dependencies.append(dependency)
self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies)) self.dependencies: list = list(OrderedDict.fromkeys(self.dependencies))
print(f'{self.yellow}{self.ascii.done}{self.endc}') print(f'{self.bgreen}{self.ascii.done}{self.endc}')
def add_dependencies_to_install_order(self) -> None: def add_dependencies_to_install_order(self) -> None:
self.install_order.extend(self.dependencies) self.install_order.extend(self.dependencies)
@ -156,7 +156,7 @@ class Slackbuilds(Configs):
self.sources[sbo] = (sources, Path(self.build_path, sbo)) self.sources[sbo] = (sources, Path(self.build_path, sbo))
print(f'{self.yellow}{self.ascii.done}{self.endc}') print(f'{self.bgreen}{self.ascii.done}{self.endc}')
if self.gpg_verification and self.repository == self.repos.sbo_repo_name: if self.gpg_verification and self.repository == self.repos.sbo_repo_name:
self.gpg.verify(asc_files) self.gpg.verify(asc_files)

View file

@ -77,11 +77,10 @@ class Utilities(Configs):
'tag': pkg_tag 'tag': pkg_tag
} }
def finished_time(self, elapsed_time: float) -> None: @staticmethod
def finished_time(elapsed_time: float) -> None:
""" Printing the elapsed time. """ """ Printing the elapsed time. """
print(f'\n{self.yellow}Finished:{self.endc}', print(f'\nFinished:', time.strftime(f'%H:%M:%S', time.gmtime(elapsed_time)))
time.strftime(f'{self.cyan}%H:%M:%S{self.endc}',
time.gmtime(elapsed_time)))
@staticmethod @staticmethod
def is_option(options: tuple, flags: list) -> bool: def is_option(options: tuple, flags: list) -> bool: