Renamed command search to view

Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
Dimitris Zlatanidis 2022-10-24 12:19:13 +03:00
parent 5b79be899f
commit bdc9f3ae83
6 changed files with 12 additions and 11 deletions

View file

@ -2,6 +2,7 @@
Updated: Updated:
- Removed version for skip installed option - Removed version for skip installed option
- Removed unused configurations - Removed unused configurations
- Search command to view
4.2.1 - 18/10/2022 4.2.1 - 18/10/2022
Added: Added:

View file

@ -55,7 +55,7 @@ Usage
download <packages> Download only the packages. download <packages> Download only the packages.
remove <packages> Remove installed packages. remove <packages> Remove installed packages.
find <packages> Find installed packages. find <packages> Find installed packages.
search <packages> Search packages on repository. view <packages> View packages from the repository.
clean-logs Clean dependencies log tracking. clean-logs Clean dependencies log tracking.
clean-tmp Deletes all the downloaded sources. clean-tmp Deletes all the downloaded sources.

View file

@ -4,7 +4,7 @@
slpkg - [OPTIONS] [COMMAND] <packages> slpkg - [OPTIONS] [COMMAND] <packages>
.SH SYNAPSES .SH SYNAPSES
.P .P
slpkg [-h|-v] [update] [upgrade] [build] [install] [download] [remove] [find] [search] [clean-logs] [clean-tmp] --yes --jobs --resolve-off --reinstall --skip-installed slpkg [-h|-v] [update] [upgrade] [build] [install] [download] [remove] [find] [view] [clean-logs] [clean-tmp] --yes --jobs --resolve-off --reinstall --skip-installed
.SH DESCRIPTION .SH DESCRIPTION
.P .P
Slpkg is a software package manager that installs, updates, and removes packages on Slackware based systems. It automatically computes dependencies and figures out what things should occur to install packages. Slpkg makes it easier to maintain groups of machines without having to manually update. Slpkg is a software package manager that installs, updates, and removes packages on Slackware based systems. It automatically computes dependencies and figures out what things should occur to install packages. Slpkg makes it easier to maintain groups of machines without having to manually update.
@ -47,9 +47,9 @@ find
Find sbo installed packages on your distribution. Find sbo installed packages on your distribution.
.RE .RE
.P .P
search view
.RS .RS
Search packages on repository and view everything in your terminal. View packages from the repository and get everything in your terminal.
.RE .RE
.P .P
clean-logs clean-logs

View file

@ -6,7 +6,7 @@ import sys
from dataclasses import dataclass from dataclasses import dataclass
from slpkg.checks import Check from slpkg.checks import Check
from slpkg.search import Search from slpkg.view_package import ViewPackage
from slpkg.upgrade import Upgrade from slpkg.upgrade import Upgrade
from slpkg.version import Version from slpkg.version import Version
from slpkg.configs import Configs from slpkg.configs import Configs
@ -131,15 +131,15 @@ class Argparse:
raise SystemExit() raise SystemExit()
usage(1) usage(1)
def search(self): def view(self):
if len(self.args) >= 2 and not self.flags: if len(self.args) >= 2 and not self.flags:
packages = list(set(self.args[1:])) packages = list(set(self.args[1:]))
packages = self.check.blacklist(packages) packages = self.check.blacklist(packages)
self.check.exists(packages) self.check.exists(packages)
search = Search() view = ViewPackage()
search.package(packages) view.package(packages)
raise SystemExit() raise SystemExit()
usage(1) usage(1)
@ -193,7 +193,7 @@ def main():
'install': argparse.install, 'install': argparse.install,
'download': argparse.download, 'download': argparse.download,
'remove': argparse.remove, 'remove': argparse.remove,
'search': argparse.search, 'view': argparse.view,
'find': argparse.find, 'find': argparse.find,
'clean-logs': argparse.clean_logs, 'clean-logs': argparse.clean_logs,
'clean-tmp': argparse.clean_tmp 'clean-tmp': argparse.clean_tmp

View file

@ -11,7 +11,7 @@ from slpkg.models.models import session as Session
@dataclass @dataclass
class Search: class ViewPackage:
session: str = Session session: str = Session
colors: dict = Configs.colour colors: dict = Configs.colour
sbo_repo_url: str = Configs.sbo_repo_url sbo_repo_url: str = Configs.sbo_repo_url

View file

@ -26,7 +26,7 @@ def usage(status: int):
f' {CYAN}download{ENDC} <packages> Download only the packages.', f' {CYAN}download{ENDC} <packages> Download only the packages.',
f' {CYAN}remove{ENDC} <packages> Remove installed packages.', f' {CYAN}remove{ENDC} <packages> Remove installed packages.',
f' {CYAN}find{ENDC} <packages> Find installed packages.', f' {CYAN}find{ENDC} <packages> Find installed packages.',
f' {CYAN}search{ENDC} <packages> Search packages on repository.', f' {CYAN}view{ENDC} <packages> View packages from the repository.',
f' {CYAN}clean-logs{ENDC} Clean dependencies log tracking.', f' {CYAN}clean-logs{ENDC} Clean dependencies log tracking.',
f' {CYAN}clean-tmp{ENDC} Delete all the downloaded sources.\n', f' {CYAN}clean-tmp{ENDC} Delete all the downloaded sources.\n',
f'{BOLD}OPTIONS:{ENDC}', f'{BOLD}OPTIONS:{ENDC}',