mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-19 10:27:07 +01:00
Updated for naming
This commit is contained in:
parent
7f9a872abb
commit
21e9dbfc29
2 changed files with 5 additions and 5 deletions
|
@ -58,7 +58,7 @@ class Ascii(Configs):
|
|||
print(f'{self.bgreen}{self.vertical_line}{self.endc} Package:' + ' ' * 22 + 'Version:' +
|
||||
' ' * (self.columns - 66) + 'Size:' + ' ' * 14 + f'Repo:{self.bgreen} {self.vertical_line}{self.endc}')
|
||||
|
||||
def draw_view_package(self, package: str, version: str, size: str, color: str, repo: str) -> None:
|
||||
def draw_package(self, package: str, version: str, size: str, color: str, repo: str) -> None:
|
||||
""" Draw nad print the packages. """
|
||||
if len(version) >= 11 and self.columns <= 80:
|
||||
version: str = f'{version[:10]}...'
|
||||
|
|
|
@ -108,7 +108,7 @@ class ViewMessage(Configs):
|
|||
size: str = self.utils.convert_file_sizes(
|
||||
int(''.join(re.findall(r'\d+', self.data[package]['size_comp']))))
|
||||
|
||||
self.ascii.draw_view_package(package, version, size, color, self.repository)
|
||||
self.ascii.draw_package(package, version, size, color, self.repository)
|
||||
|
||||
def view_install_upgrade_package(self, package: str, mode: str) -> None:
|
||||
size: str = str()
|
||||
|
@ -135,7 +135,7 @@ class ViewMessage(Configs):
|
|||
color: str = self.violet
|
||||
package: str = self.build_package_and_version(package)
|
||||
|
||||
self.ascii.draw_view_package(package, version, size, color, self.repository)
|
||||
self.ascii.draw_package(package, version, size, color, self.repository)
|
||||
|
||||
def view_download_package(self, package: str) -> None:
|
||||
size: str = str()
|
||||
|
@ -147,7 +147,7 @@ class ViewMessage(Configs):
|
|||
size: str = self.utils.convert_file_sizes(
|
||||
int(''.join(re.findall(r'\d+', self.data[package]['size_comp']))))
|
||||
|
||||
self.ascii.draw_view_package(package, version, size, color, self.repository)
|
||||
self.ascii.draw_package(package, version, size, color, self.repository)
|
||||
|
||||
def view_remove_package(self, package: str) -> None:
|
||||
installed: str = self.utils.is_package_installed(package)
|
||||
|
@ -156,7 +156,7 @@ class ViewMessage(Configs):
|
|||
size: str = self.utils.get_file_size(Path(self.log_packages, installed))
|
||||
repository: str = repo_tag.lower().replace('_', '')
|
||||
|
||||
self.ascii.draw_view_package(package, version, size, self.red, repository)
|
||||
self.ascii.draw_package(package, version, size, self.red, repository)
|
||||
|
||||
def logs_packages(self, dependencies: list) -> None:
|
||||
print('The following logs will be removed:\n')
|
||||
|
|
Loading…
Reference in a new issue