doc/tools/buildpnms.sh
Ceri Davies 798c983fea Some people don't have 20/20 vision, so elide 'I' and '1' from the
characters in the confirmation image.

en/gifs/1.pnm and en/gifs/I.pnm will be safe to remove 45 minutes after
the next web build and not before, so I'll do that tomorrow.

PR:	www/69676
2004-07-27 20:34:40 +00:00

29 lines
901 B
Bash
Executable file

#!/bin/sh
#
# $FreeBSD: www/tools/buildpnms.sh,v 1.1 2003/12/14 17:28:12 ceri Exp $
#
# 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 I,O,0,1 for clarity)
availchars="A B C D E F G H J K L M N P Q R S T U V W X Y Z 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