airprint-generate.py(8)
β¨ 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 toSTDERR.-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
- opensuse-leap 16.0: cups-airprint 1.1-bp160.1.6 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms