从运行中的CUPS实例获取打印机的工具
项目描述
cups-printer
从CUPS服务器检索所有打印机。这是一个简单的命令行工具,允许用户输出现有打印机或将它们写入文件。
安装
可能需要安装CUPS的开发包,例如 $ sudo dnf -y install cups-devel
。
PyPI
该软件包托管在 PyPI。它依赖于 typer
和 pycups
。
$ pip install cups_printer
手动设置
$ python3 -m venv
$ source bin/activate
$ python3 setup.py
用法
默认的CUPS实例是 localhost
。
$ cups-printers --help
Usage: cups-printers [OPTIONS] COMMAND [ARGS]...
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --server TEXT The server URL of CUPS instance [env var: CUPS_SERVER] [default: localhost:631] │
│ --timeout TEXT Timeout for network operations [env var: TIMEOUT] [default: 5] │
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to copy it or customize the installation. │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ output │
│ queue │
│ state │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
要从远程CUPS实例获取详细信息,请使用 --server
。
$ cups-printers --server 192.168.191.1:631 output json
许可证
cups-printers
基于 MIT 许可。
项目详情
关闭
cups_printers-1.0.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 9a8fd0c83286ddb0d5b3a8ff932279b6588b0e4bd0f33dd170bfa9e36d8bebc1 |
|
MD5 | 594b5a2c721011e97480ffdb2d236daf |
|
BLAKE2b-256 | 87eeaa59db82ef80239450282a2e5b2e67d831fb128775d2deeace7868d077af |
关闭
cups_printers-1.0.0-py3-none-any.whl 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 68510ec9b1e19840a0fa2bd477873046d0dca1b4ef90b75b672c012aacb09e96 |
|
MD5 | 46f5edaa722cc780502e4830a991048c |
|
BLAKE2b-256 | 65c2320055391852bd5c4ecb592ead58425e4312d631653feb77460688528276 |