From b91963ed9fd7d421b34163661cdb611be677c45b Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Wed, 23 Nov 2022 21:25:55 +0200 Subject: [PATCH] Updated the cli menu Signed-off-by: Dimitris Zlatanidis --- ChangeLog.txt | 2 ++ README.rst | 38 +++++++++++++++++++------------------- slpkg/main.py | 23 +++++++++++++++-------- slpkg/views/cli_menu.py | 38 +++++++++++++++++++------------------- 4 files changed, 55 insertions(+), 46 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 6853e61e..b17cdc50 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,8 @@ 4.3.0 - 23/11/2022 Added: - Message for blacklisted packages +Updated: +- The cli menu 4.2.9 - 19/11/2022 Bugfixed: diff --git a/README.rst b/README.rst index b1c180ef..cb5d70c6 100644 --- a/README.rst +++ b/README.rst @@ -48,28 +48,28 @@ Usage Packaging tool that interacts with the SBo repository. COMMANDS: - update Update the package lists. - upgrade Upgrade all the packages. - check-updates Check for news on ChangeLog.txt. - build Build only the packages. - install Build and install the packages. - download Download only the scripts and sources. - remove Remove installed packages. - find Find installed packages. - view View packages from the repository. - search Search packages from the repository. - clean-logs Clean dependencies log tracking. - clean-tmp Deletes all the downloaded sources. + update Update the package lists. + upgrade Upgrade all the packages. + check-updates Check for news on ChangeLog.txt. + clean-logs Clean dependencies log tracking. + clean-tmp Deletes all the downloaded sources. + -b, build Build only the packages. + -i, install Build and install the packages. + -d, download Download only the scripts and sources. + -r, remove Remove installed packages. + -f, find Find installed packages. + -w, view View packages from the repository. + -s, search Search packages from the repository. OPTIONS: - --yes Answer Yes to all questions. - --jobs Set it for multicore systems. - --resolve-off Turns off dependency resolving. - --reinstall Upgrade packages of the same version. - --skip-installed Skip installed packages. + --yes Answer Yes to all questions. + --jobs Set it for multicore systems. + --resolve-off Turns off dependency resolving. + --reinstall Upgrade packages of the same version. + --skip-installed Skip installed packages. - -h, --help Show this message and exit. - -v, --version Print version and exit. + -h, --help Show this message and exit. + -v, --version Print version and exit. If you need more information try to use slpkg manpage. diff --git a/slpkg/main.py b/slpkg/main.py index fcbac2a6..4a725391 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -222,15 +222,22 @@ def main(): 'update': argparse.update, 'upgrade': argparse.upgrade, 'check-updates': argparse.check_updates, - 'build': argparse.build, - 'install': argparse.install, - 'download': argparse.download, - 'remove': argparse.remove, - 'view': argparse.view, - 'find': argparse.find, - 'search': argparse.search, 'clean-logs': argparse.clean_logs, - 'clean-tmp': argparse.clean_tmp + 'clean-tmp': argparse.clean_tmp, + 'build': argparse.build, + '-b': argparse.build, + 'install': argparse.install, + '-i': argparse.install, + 'download': argparse.download, + '-d': argparse.download, + 'remove': argparse.remove, + '-r': argparse.remove, + 'view': argparse.view, + '-w': argparse.view, + 'find': argparse.find, + '-f': argparse.find, + 'search': argparse.search, + '-s': argparse.search } try: diff --git a/slpkg/views/cli_menu.py b/slpkg/views/cli_menu.py index 80417829..15457d5c 100644 --- a/slpkg/views/cli_menu.py +++ b/slpkg/views/cli_menu.py @@ -19,26 +19,26 @@ def usage(status: int): f'{BOLD}DESCRIPTION:{ENDC}', ' Packaging tool that interacts with the SBo repository.\n', f'{BOLD}COMMANDS:{ENDC}', - f' {RED}update{ENDC} Update the package lists.', - f' {CYAN}upgrade{ENDC} Upgrade all the packages.', - f' {CYAN}check-updates{ENDC} Check for news on ChangeLog.txt.', - f' {CYAN}build{ENDC} Build only the packages.', - f' {CYAN}install{ENDC} Build and install the packages.', - f' {CYAN}download{ENDC} Download only the scripts and sources.', - f' {CYAN}remove{ENDC} Remove installed packages.', - f' {CYAN}find{ENDC} Find installed packages.', - f' {CYAN}view{ENDC} View packages from the repository.', - f' {CYAN}search{ENDC} Search packages from the repository.', - f' {CYAN}clean-logs{ENDC} Clean dependencies log tracking.', - f' {CYAN}clean-tmp{ENDC} Delete all the downloaded sources.\n', + f' {RED}update{ENDC} Update the package lists.', + f' {CYAN}upgrade{ENDC} Upgrade all the packages.', + f' {CYAN}check-updates{ENDC} Check for news on ChangeLog.txt.', + f' {CYAN}clean-logs{ENDC} Clean dependencies log tracking.', + f' {CYAN}clean-tmp{ENDC} Delete all the downloaded sources.', + f' {CYAN}-b, build{ENDC} Build only the packages.', + f' {CYAN}-i, install{ENDC} Build and install the packages.', + f' {CYAN}-d, download{ENDC} Download only the scripts and sources.', + f' {CYAN}-r, remove{ENDC} Remove installed packages.', + f' {CYAN}-f, find{ENDC} Find installed packages.', + f' {CYAN}-w, view{ENDC} View packages from the repository.', + f' {CYAN}-s, search{ENDC} Search packages from the repository.\n', f'{BOLD}OPTIONS:{ENDC}', - f' {YELLOW}--yes{ENDC} Answer Yes to all questions.', - f' {YELLOW}--jobs{ENDC} Set it for multicore systems.', - f' {YELLOW}--resolve-off{ENDC} Turns off dependency resolving.', - f' {YELLOW}--reinstall{ENDC} Upgrade packages of the same version.', - f' {YELLOW}--skip-installed{ENDC} Skip installed packages.\n', - ' -h, --help Show this message and exit.', - ' -v, --version Print version and exit.\n', + f' {YELLOW}--yes{ENDC} Answer Yes to all questions.', + f' {YELLOW}--jobs{ENDC} Set it for multicore systems.', + f' {YELLOW}--resolve-off{ENDC} Turns off dependency resolving.', + f' {YELLOW}--reinstall{ENDC} Upgrade packages of the same version.', + f' {YELLOW}--skip-installed{ENDC} Skip installed packages.\n', + ' -h, --help Show this message and exit.', + ' -v, --version Print version and exit.\n', 'Edit the configuration file in the /etc/slpkg/slpkg.yml.', 'If you need more information try to use slpkg manpage.']