## Date: Tue, 5 Oct 2004 08:29:49 -0400 (EDT) ## From: Fabrizio Morbini ## To: "Lenhart K. Schubert" ## Subject: faster version of the printing script ## ## Hi Len, I have updated the printing script including resolution reduction ## of the image so that the printing process is about ten times faster than ## in the previous version (with a small reduction in the quality of the ## output). ## ## Fabrizio. #!/bin/bash #choose the printer PRINTER=dali #color #PRINTER=chaucer #black and white 7th floor #PRINTER=shake #black and white 6th floor if [ -z $1 ] then echo "This are the slides avaible:"; ls /u/www/u/schubert/247-447/slides/; echo "give one of the listed numbers as parameter of the script" elif ( ls /u/www/u/schubert/247-447/slides/$1 &> /dev/null ) then echo "The slide exists! printing in progress..." for f in $(ls /u/www/u/schubert/247-447/slides/$1/*.jpg); do echo $f NAME=$(basename $f) echo "Conversion of $NAME in progress..." convert $f -geometry 580 -antialias ~/tmp/$NAME.ps echo "Printing of $NAME.ps on $PRINTER in progress..." lpr -P$PRINTER ~/tmp/$NAME.ps echo "~/tmp/$NAME.ps removed." rm -f ~/tmp/$NAME.ps done else echo "The slide you specified DOESN'T exist!" echo "This are the slides avaible:"; ls /u/www/u/schubert/247-447/slides/; echo "give one of the listed numbers as parameter of the script" fi