555cb01e5a
This code relies on the netpbm port being installed ; this is already a dependency of the textproc/docproj port. This comes courtesy of a collaboration with Eric Anderson <anderson@centtech.com> who submitted both the idea and the vast majority of the code to implement it; thank you very much, Eric - this is a great Christmas present to us and our user community.
29 lines
831 B
Bash
Executable file
29 lines
831 B
Bash
Executable file
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# Shell script to generate the .pnm files required for the send-pr
|
|
# mechanism. This is not used by the build process, as it requires
|
|
# X libraries for the gozer program; rather they are generated and
|
|
# committed into www/en/gifs/
|
|
|
|
GOZER=/usr/X11R6/bin/gozer
|
|
PNGTOPNM=/usr/local/bin/pngtopnm
|
|
VERBOSE=/usr/bin/false
|
|
|
|
# Generate 8 character code from A-Z0-9 (no o,O,0)
|
|
availchars="A B C D E F G H I J K L M N P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9"
|
|
|
|
for char in ${availchars}
|
|
do
|
|
${VERBOSE} Making ${char}.png...
|
|
${GOZER} -x 2 -t ${char} -f "#990000" -b "#ffffff" ${char}.png
|
|
${VERBOSE} DONE
|
|
${VERBOSE} Converting ${char}.pnm to ${char}.png...
|
|
${PNGTOPNM} ${char}.png > ${char}.pnm
|
|
${VERBOSE} DONE
|
|
${VERBOSE} Removing ${char}.png...
|
|
rm ${char}.png
|
|
${VERBOSE} DONE
|
|
done
|
|
|