alexander-naumov / pkgsearch

Simple little script to search for packages from a OpenBSD package repository

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pkgsearch

  • pkgsearch is a easy to use tool to search the OpenBSD package repository.
  • pkgsearch downloads the current package index to the local system so as to make a search request fast. This also means searches can be made offline.
  • pkgsearch also provides emoji output with the "-e" flag.
usage: pkgsearch [-h] [-e] [-i] [-v] [-d] package

Example Output

pkgsearch

Install

  1. Clone/Download the code in this repository
  2. Install the necessary dependencies
# pkg_add python py3-requests
  1. Execute (For example):
$ ./pkgsearch python3

or with emojis displayed:

$ ./pkgsearch -e python3

pkgsearch was tested on the current OpenBSD release 7.3 but should also work on older systems.

Hint

Make sure you set your desired mirror. This can be done by changing the INDEX_URL variable in the pkgsearch script.

Example:

...
INDEX_URL = 'https://ftp.spline.de/pub/OpenBSD/7.3/packages/amd64/index.txt'
...

Thanks

Laurent Cheylus (https://github.com/lcheylus) - Code cleanup and improvements (PEP8). Also for improving error handling. Adding the "-v" flag and further improving the code.
Cuddle (https://mastodon.bsd.cafe/@cuddle) and Laurent Cheylus (https://github.com/lcheylus) - Cuddle: For improving the codebase and removing the need for a external Python package (Emojis). Laurent Cheylus: For reviewing/creating the PR.

About

Simple little script to search for packages from a OpenBSD package repository

License:ISC License


Languages

Language:Python 100.0%