puzzle/make_puzzles.sh

16 lines
315 B
Bash
Raw Permalink Normal View History

2025-04-29 09:57:22 -07:00
PREFIX=$(echo $1 | sed 's/.pdf//')
TMPDIR=$(mktemp -d)
MYDIR=$PWD
cd $TMPDIR
cp $MYDIR/$PREFIX.pdf $TMPDIR/
pdftoppm -png -x 90 -y 100 -W 1120 -H 1500 $PREFIX.pdf $PREFIX
rm $PREFIX.pdf
for file in *
do
CMD="/usr/bin/convert $file -transparent white $file"
eval $CMD
done
cp * $MYDIR/
cd $MYDIR
rm -rf $TMPDIR