#!/bin/bash # thindex.sh - Generate a Thumbnails HTML File # Author: Sean B. Palmer, inamidst.com # Check that we have the right tools for PROG in convert openssl do if ! which $PROG &> /dev/null then echo "Requires '$PROG'" && exit 1 fi done cat < Image Thumbnails EOF for INPUT in *.jpg *.png do echo -n "

' $INPUT output.$$.tmp || continue echo -n $(cat output.$$.tmp | openssl enc -base64) | tr -d ' \t\r\n' rm -f output.$$.tmp echo "' alt='[...]' />

" done cat < EOF # [EOF]