From e7ea4adacc3545af915e3d96375da2c707f90b15 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 9 Mar 2023 22:44:08 +0200 Subject: [PATCH] Updated for repository name --- ChangeLog.txt | 4 ++++ slpkg/views/ascii.py | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a7ee0613..60770356 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +4.5.8 - 09/03/2023 +Updated: +- View the name of the repository instead of the size + 4.5.7 - 07/03/2023 Added: - Ignore comments for list.pkgs files (Thanks to rizitis) diff --git a/slpkg/views/ascii.py b/slpkg/views/ascii.py index 05328cbf..0877b32d 100644 --- a/slpkg/views/ascii.py +++ b/slpkg/views/ascii.py @@ -49,6 +49,10 @@ class Ascii(Configs): self.bgreen: str = f'{self.bold}{self.green}' self.bred: str = f'{self.bold}{self.red}' + self.repo: str = 'sbo' + if self.ponce_repo: + self.repo: str = 'ponce' + def draw_package_title_box(self, message: str, title: str) -> None: """ Drawing package title box. """ middle_title: int = int((self.columns / 2) - len(title) + 6) @@ -67,13 +71,13 @@ class Ascii(Configs): self.draw_middle_line() print(f'{self.bgreen}{self.vertical_line}{self.endc} Package:' + ' ' * 27 + 'Version:' + - ' ' * (self.columns - 51) + f'Size{self.bgreen} {self.vertical_line}{self.endc}') + ' ' * (self.columns - 57) + f'Repository{self.bgreen} {self.vertical_line}{self.endc}') def draw_view_package(self, package: str, version: str, color: str) -> None: """ Draw nad print the packages. """ print(f'{self.bgreen}{self.vertical_line} {self.bold}{color}{package}{self.endc}' + ' ' * (35 - len(package)) + - f'{self.blue}{version}' + ' ' * ((self.columns - 37) - len(version) - 1) + - f'{self.bgreen}{self.vertical_line}{self.endc}') + f'{self.yellow}{version}' + ' ' * ((self.columns - 39) - len(version) - len(self.repo)) + + f'{self.blue}{self.repo} {self.bgreen}{self.vertical_line}{self.endc}') def draw_log_package(self, package: str) -> None: """ Drawing and print logs packages. """