configuration/local/bin/uprint

19 lines
645 B
Plaintext
Raw Normal View History

2016-11-04 10:30:11 +01:00
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: $0 [--colour] <file>"
echo
echo " -c | --colour print in colour"
echo " file file (print-ready) to print or -"
echo
echo "print print-ready files with the UGent printers. Accepts only"
echo ".txt, .ps, .pdf, .pcl, .cht and .prn."
exit 1
fi >&2
2016-12-02 14:43:38 +01:00
if [ "$1" = "-c" -o "$1" = "--colour" ]; then
2017-02-09 21:15:37 +01:00
curl --silent --insecure -F "fileToPrint=@$2" -F "FormButtonSubmit=Print" 'https://we02pr06.ugent.be/hp/device/Print/Print'
2016-11-04 10:30:11 +01:00
else
2017-02-09 21:15:37 +01:00
curl --silent --insecure -F "localFile=@$1" 'https://we02pr04.ugent.be/hp/device/this.printservice?printThis'
fi > /dev/null