: # htmlpiclist - generate a HTML list of pictures # Author: Heiner Steven (heiner.steven@odn.de) 1/97 # Category: HTML if [ $# -lt 1 ] then set -- `pwd` else # Resolve relative directory names to absolute names Dirs= for Dir do [ -d "$Dir" ] || continue case "$Dir" in /*) Dirs="$Dirs $Dir";; *) Dirs="$Dirs `cd $Dir >/dev/null 2>&1 && pwd`";; esac done set -- $Dirs fi # Print HTML header cat <<-! Pictures in $1 ! # Print all GIF and JPG images find "$@" \( -name '*.gif' -o -name '*.jpg' -o -name '*.jpeg' \ -o -name '*.xbm' -o -name '*.xpm' -o -name '*.png' \) -print | nawk ' { #print "

" $0 ":
" #print ""
" base = $0 gsub (/.*\//, "", base) #print $0 print base print " " # Uncomment the next line to generate links to # the pictures instead of including the pictures # themselves #print "" $0 "
" } ' # Print HTML footer cat <<-! !