airprint-generate.py(8)

πŸ“¦ version 1.1, in opensuse-leap 16.0

✨ NAME ✨

okay so this page is airprint-generate.py(8), from the System Administration manual section β€” and its whole thing is creating Avahi service files for shared CUPS printers. iconic behavior, honestly πŸ’…


🌸 SYNOPSIS 🌸

airprint-generate.py [options]

πŸ’… DESCRIPTION πŸ’…

bestie, this script connects to a CUPS server and, for every printer that’s configured and marked as shared, it generates a .service file for Avahi that’s compatible with Apple's AirPrint announcements. no cap, that’s the main character move ✨

Any printer that can be configured to work with CUPS can be used. but heads up:

Printers should not be configured in CUPS as raw, unless the printer can natively print PDF. Basically, CUPS needs to already be configured with a PDF filter. don’t skip that part, okay? 😭

πŸŽ€ OPTIONS πŸŽ€

  • -h, --help β€” shows this help message and exits. polite, brief, slay.
  • -H HOSTNAME, --host=HOSTNAME β€” the hostname of the CUPS server.
  • -P PORT, --port=PORT β€” the port number of the CUPS server.
  • -u USER, --user=USER β€” the username to authenticate with against CUPS.
  • -d DIRECTORY, --directory=DIRECTORY β€” the directory where the service files are created.
  • -v, --verbose β€” prints debugging information to STDERR.
  • -p PREFIX, --prefix=PREFIX β€” prefixes all files with this string.

πŸ¦‹ REMARKS πŸ¦‹

DNSSD has a limit of 255 characters for a given txt-record; because of this, the list of accepted PDLs will be truncated to fit. if you’re curious which ones get trimmed out of the list, run the script with the verbose flag πŸ‘€

If python-lxml is installed, .service files will be generated in a human readble format. the author also notes: I wasn't able to get minidom's version to work acceptably. keeping it real fr fr 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Timothy J. Fontaine <tjfontaine@gmail.com> wrote the airprint-generate.py script. thank you king/queen/monarch for your service 🌈


mwah πŸ’‹ β€” this page’s source/version is cups-airprint, dated January 2016. bye bestie, go generate some gorgeous little service files πŸ’–πŸŽ€

πŸ“¦ where this page comes from