Created
October 10, 2017 08:26
-
-
Save MaPePeR/9adb8bb2cff1a50ec3bf13d0542a8992 to your computer and use it in GitHub Desktop.
Generate a wget+lpadmin script that installs all printers from a cups server as local printers. Keeping Description and Location. Downloads a lot of .ppd Files that might need cleanup. Might not work with other versions of cups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -O- http://$1/printers/ | sed -E 's@<TR><TD><A HREF="/printers/([[:alnum:]]+)">\1</A></TD><TD>([^<]+)</TD><TD>([^<]+)</TD>.+$@echo Installing printer "\1"\nwget http://'$1'/printers/\1.ppd\nlpadmin -p \1 -E -v ipp://'$1'/printers/\1 -D "\2" -L "\3" -P \1.ppd@;tx;d;:x' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment