From 7b1b97e0d04ac770f1e34e11b144f6c466bcb211 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sun, 7 Apr 2024 22:23:00 +0300 Subject: [PATCH] Added file size --- ChangeLog.txt | 1 + slpkg/find_installed.py | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 0952436d..5617b765 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -4,6 +4,7 @@ - Added: * Added maximum parallel for downloading in the config file * Added --pkg-version option in search command + * Added display the file size with the command find - Updated: * Updated to exclude packages from slack_extra repository (Thanks to Marav) diff --git a/slpkg/find_installed.py b/slpkg/find_installed.py index 3f5c88cf..aabff36b 100644 --- a/slpkg/find_installed.py +++ b/slpkg/find_installed.py @@ -39,7 +39,10 @@ class FindInstalled(Configs): def view_matched_packages(self) -> None: for package in self.matching: - print(f'{self.cyan}{package}{self.endc}') + name: str = self.utils.split_package(package)['name'] + pkg_size: int = self.utils.count_file_size(name) + size: str = self.utils.convert_file_sizes(pkg_size) + print(f'{self.cyan}{package}{self.endc} ({size})') self.view_summary() def view_summary(self) -> None: