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:
- Removed version for skip installed option
- Removed unused configurations
- Search command to view
4.2.1 - 18/10/2022
Added:

View file

@ -55,7 +55,7 @@ Usage
download <packages> Download only the packages.
remove <packages> Remove 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-tmp Deletes all the downloaded sources.

View file

@ -4,7 +4,7 @@
slpkg - [OPTIONS] [COMMAND] <packages>
.SH SYNAPSES
.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
.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.
@ -47,9 +47,9 @@ find
Find sbo installed packages on your distribution.
.RE
.P
search
view
.RS
Search packages on repository and view everything in your terminal.
View packages from the repository and get everything in your terminal.
.RE
.P
clean-logs

View file

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

View file

@ -11,7 +11,7 @@ from slpkg.models.models import session as Session
@dataclass
class Search:
class ViewPackage:
session: str = Session
colors: dict = Configs.colour
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}remove{ENDC} <packages> Remove 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-tmp{ENDC} Delete all the downloaded sources.\n',
f'{BOLD}OPTIONS:{ENDC}',