Added summary

This commit is contained in:
Dimitris Zlatanidis 2023-01-13 17:59:36 +02:00
parent 232c5a9eb9
commit decb1dae28

View file

@ -15,6 +15,7 @@ class SearchPackage:
self.cyan = self.color['cyan']
self.endc = self.color['endc']
self.green = self.color['green']
self.grey = self.color['grey']
def package(self, packages: list):
""" Searching and print the matched slackbuilds. """
@ -32,5 +33,8 @@ class SearchPackage:
desc = SBoQueries(name).description().replace(name, '')
print(f'{self.cyan}{name}{self.endc}-{self.yellow}{SBoQueries(name).version()}{self.endc}'
f'{self.green}{desc}{self.endc}')
if not matching:
print('\nDoes not match any package.\n')
else:
print(f'\n{self.grey}Total found {matching} packages.{self.endc}')