Giter VIP home page Giter VIP logo

cups-printers's Introduction

cups-printer

Retrieve all printers from a CUPS server. It's a simple command-line tool that allows one to output the existing printers or write them to a file.

Installation

It may require that the development package for CUPS is installed, e.g. $ sudo dnf -y install cups-devel.

PyPI

The package is hosted on PyPI. It depends on typer and pycups.

$ pip install cups_printer

Nixpkgs

For Nix or NixOS users is a package available in Nixpkgs. Keep in mind that the lastest releases might only be present in the unstable channel.

$ nix-env -iA nixos.cups-printers

Manual setup

$ python3 -m venv 
$ source bin/activate
$ python3 setup.py

Usage

The default CUPS instance which is used is 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                                                                                                                   │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

To get the details from a remote CUPS instance, use --server.

$ cups-printers --server 192.168.191.1:631 output json

License

cups-printers ìs license under MIT.

cups-printers's People

Contributors

fabaff avatar

Stargazers

Simon Belluzzo avatar Stephan Traub avatar

Watchers

 avatar James Cloos avatar Stephan Traub avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.