#! /bin/sh

BILDERDIR=$HOME/Documents/Blog-Bilder/
TEXT="$1"
POINTSIZE=88

if [ -n "$2" ] ; then
  POINTSIZE=$2
fi

if [ ${#TEXT} -gt 10 ] 
then 
	POINTSIZE=$((88*10/${#TEXT}))
fi

convert -gravity center -annotate 0 "$TEXT" -pointsize $POINTSIZE -family "Albany AMT" "$BILDERDIR/Wegweiser-Muster.png" "$BILDERDIR/WW-$1.png"

nconvert -o "$BILDERDIR/WW-$1-170.png" -ratio -resize 170 "$BILDERDIR/WW-$1.png"
