No project description provided
Project description
PyCUPS CLI
Allows to interact with CUPS in CLI using pycups. This script outputs the data in JSON, which allows to easily parse it in scripts with jq. For example getting a list of installed printers and their status is as simple as: pycupscli printers | jq -r 'keys[] as $k | "\($k): \(.[$k]["printer-state"])"'.
Usage
pycupscli [check, devices, printers, cancel, remove, add, info, print] -j jobid -p name -u uri -d driver -f file -o opts -a -s server -P port -U user
Where subcommands are:
- check: check that the CUPS server is running and accessible, similar to
lpstat -r - devices: returns a list of available devices, including network printers, similar to
lpinfo -v - printers: returns the list of configured printers, similar to
lpstat -v - cancel: cancels one or all jobs for a printer, requires
-u uriand either-aor-j jobid - remove: remove a printer, requires either
-u urior-p name - add: add a printer, requires
-u uri,-p nameand-d driver - info: returns the attributes of an existing job or printer, requires
-j jobidor-p nameor-u uri - print: print a file, requires
-p nameand-f file, optionally-o optswith options seralized as a json object
The optional -s, -P and -U arguments allow to specify the CUPS address (or socker path), port and user.
The output of the script is just the raw data returned by pycups, serialized as json.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pycupscli-1.2.0.tar.gz.
File metadata
- Download URL: pycupscli-1.2.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.2 Linux/6.1.0-5-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b0943ae6e7274a2ed5e036fd3a7042a35958f74ffa61cb42d2786a68a79cf26
|
|
| MD5 |
72086228b9308d87cfdcf5bd61d48cc8
|
|
| BLAKE2b-256 |
8a7d5b62e41e1c3635f5ed525ef19b2751c340ac970ab4c76f76bc98de128a5b
|
File details
Details for the file pycupscli-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pycupscli-1.2.0-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.11.2 Linux/6.1.0-5-amd64
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4ad51107c2696247d67760654462c33677079227023747edf3b87c4f5698bca
|
|
| MD5 |
c566bbf6dc0fbb08e10d6e6ecbe01337
|
|
| BLAKE2b-256 |
7ff814391fd6bc42fa71f889dcffabc6c372b2a60a094a8a7cbbec2b824c6f70
|