跳转到主要内容

查询Fedora包Web应用的控制台工具

项目描述

发音为“package WAT”。 pkgwat 是一个用于查询 Fedora包Web应用 的快速控制台工具。

您可以通过 帮助我们标记软件包 来使其搜索更加完善。

Python API

有一个。您可以在 http://pypi.python.org/pypi/pkgwat.api 下载它,无需安装CLI工具。

>>> from pkgwat import api
>>> results = api.search("nethack")
>>> results['rows'][0]['summary']
u'A rogue-like single player dungeon exploration game'

Shell使用

获取帮助

--- ~ » pkgwat --help
usage: pkgwat [--version] [-v] [-q] [-h] [--debug]

CLI tool for querying the fedora packages webapp

optional arguments:
  --version      show program's version number and exit
  -v, --verbose  Increase verbosity of output. Can be repeated.
  -q, --quiet    suppress output except warnings and errors
  -h, --help     show this help message and exit
  --debug        show tracebacks on errors

Commands:
  bugs           List bugs for a package
  builds         List koji builds for a package
  changelog      Show the changelog for a package
  complete       print bash completion command
  contents       Show contents of a package
  help           print detailed help for another command
  info           Show details about a package
  releases       List active releases for a package
  search         Show a list of packages that match a pattern.
  updates        List bodhi updates for a package
  dependencies   Show the dependencies for a package
  dependants     Show packages that dependent on a package
  provides       Show that which is provided by a given package
  obsoletes      Show that which is obsoleted by a given package
  conflicts      Show that which is marked as "conflict" by a given package

  To get the help of a command use "pkgwat help [command]".

您可以启用bash自动完成功能

$ pkgwat complete > pkgwat_complete.sh

Add pkgwat_complete.sh in your .bashrc

$ source .bashrc

$ pkgwat
  bugs       changelog  contents   history    info       search
  builds     complete   help       icon       releases   updates

您可以搜索软件包

--- ~ » pkgwat search nethack
+------------------+-------------------------------------------------------+
| name             | summary                                               |
+------------------+-------------------------------------------------------+
| nethack          | A rogue-like single player dungeon exploration game   |
| nethack-vultures | NetHack- Vulture's Eye and Vulture's Claw             |
| egoboo           | A top down graphical (3D) RPG in the spirit ofNethack |
| slashem          | Super Lotsa Added Stuff Hack - Extended Magic         |
| crossfire        | Server for hosting crossfire games                    |
| crossfire-client | Client for connecting to crossfire servers            |
+------------------+-------------------------------------------------------+

所有命令的输出格式都灵活可变

--- ~ » pkgwat help changelog
usage: pkgwat changelog [-h] [-f {csv,html,json,table,yaml}] [-c COLUMN]
                        [--quote {all,minimal,none,nonnumeric}]
                        [--rows-per-page ROWS_PER_PAGE]
                        [--start-row START_ROW]
                        package

Show the changelog for a package

positional arguments:
  package

optional arguments:
  -h, --help            show this help message and exit
  --rows-per-page ROWS_PER_PAGE
  --start-row START_ROW

output formatters:
  output formatter options

  -f {csv,html,json,table,yaml}, --format {csv,html,json,table,yaml}
                        the output format, defaults to table
  -c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated

CSV Formatter:
  --quote {all,minimal,none,nonnumeric}
                        when to include quotes, defaults to nonnumeric

甚至还有一个Shell。只需运行 $ pkgwat

设置开发环境

请确保已安装 virtualenv 并创建一个新的venv

$ virtualenv env
$ source env/bin/activate
$ pip install -e .

如果您打算同时工作在 pkgwat.api 上,请安装您本地的版本

$ pip install -e /path/to/pkgwat.api

运行测试套件

请确保已安装 tox 并运行它(在任何虚拟环境中)

$ tox

发布新版本

为了生成要放入 CHANGELOG.rst 中的变更列表,请使用以下命令(此示例生成 0.11HEAD 引用之间的日志)

git log --reverse --format=format:'- %s `%h <https://github.com/fedora-infra/pkgwat.cli/commit/%H>`_' 0.11..HEAD

许可证

pkgwat 采用 LGPLv2+ 许可。

项目详情


下载文件

下载适合您平台文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

pkgwat.cli-0.13.tar.gz (29.3 kB 查看哈希)

上传时间

由以下支持