mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-05 08:46:20 +01:00
Updated for repository print
This commit is contained in:
parent
9edf3010de
commit
2c17aeda17
1 changed files with 5 additions and 2 deletions
|
@ -58,7 +58,6 @@ class SearchPackage(Configs):
|
|||
}
|
||||
|
||||
def summary_of_searching(self) -> None:
|
||||
version: str = ''
|
||||
try:
|
||||
repo_length: int = max(len(repo['repository']) for repo in self.data_dict.values())
|
||||
except ValueError:
|
||||
|
@ -70,11 +69,15 @@ class SearchPackage(Configs):
|
|||
name_length: int = 1
|
||||
|
||||
if self.matching:
|
||||
version: str = ''
|
||||
repository: str = ''
|
||||
for item in self.data_dict.values():
|
||||
if self.option_for_pkg_version:
|
||||
version: str = item['version']
|
||||
if self.repository == '*':
|
||||
repository: str = f"{item['repository']:<{repo_length}} : "
|
||||
|
||||
print(f"{item['repository']:<{repo_length}} : {self.cyan}{item['name']:<{name_length}}{self.endc} "
|
||||
print(f"{repository}{self.cyan}{item['name']:<{name_length}}{self.endc} "
|
||||
f"{self.yellow}{version}{self.endc}")
|
||||
|
||||
print(f'\n{self.grey}Total found {self.matching} packages.{self.endc}')
|
||||
|
|
Loading…
Add table
Reference in a new issue