mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
Updated for name alignment
This commit is contained in:
parent
4de52b4975
commit
64123b96ed
1 changed files with 6 additions and 3 deletions
|
@ -22,7 +22,10 @@ class RepoInfo(Configs):
|
|||
self.utils = Utilities()
|
||||
self.repos = Repositories()
|
||||
self.columns, self.rows = shutil.get_terminal_size()
|
||||
self.auto_alignment: int = (self.columns - 80) + 18
|
||||
self.name_alignment: int = (self.columns - 80) + 18
|
||||
|
||||
if self.name_alignment < 1:
|
||||
self.name_alignment: int = 1
|
||||
|
||||
self.enabled: int = 0
|
||||
self.total_packages: int = 0
|
||||
|
@ -70,7 +73,7 @@ class RepoInfo(Configs):
|
|||
title: str = f'repository information:'.title()
|
||||
print(title)
|
||||
print('=' * self.columns)
|
||||
print(f"{'Name:':<{self.auto_alignment}}{'Status:':<15}{'Last Updated:':<35}{'Packages:':>12}")
|
||||
print(f"{'Name:':<{self.name_alignment}}{'Status:':<15}{'Last Updated:':<35}{'Packages:':>12}")
|
||||
print('=' * self.columns)
|
||||
|
||||
def view_the_repository_information(self):
|
||||
|
@ -104,7 +107,7 @@ class RepoInfo(Configs):
|
|||
self.view_summary_of_all_repositories()
|
||||
|
||||
def view_the_line_information(self, repository: str, status: str, date: str, count: int, color: str):
|
||||
print(f"{self.cyan}{repository:<{self.auto_alignment}}{self.endc}{color}{status:<15}{self.endc}{date:<35}"
|
||||
print(f"{self.cyan}{repository:<{self.name_alignment}}{self.endc}{color}{status:<15}{self.endc}{date:<35}"
|
||||
f"{self.yellow}{count:>12}{self.endc}")
|
||||
|
||||
def view_summary_of_repository(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue