#!/bin/sh # ps2web_full by David Dumas # Turn a postscript or PDF file into a web slideshow. # Output in a directory called "html". # REQUIRES ps2web # REQUIRES igal (see http://www.stanford.edu/~epop/igal/) if [ $# -lt 2 ]; then echo 1>&2 Usage: $0 DOCUMENT.ps SLIDESHOW_TITLE exit 127 fi if [ ! -f "$1" ]; then echo 1>&2 Error: Input file \"$1\" not found. exit 127 fi if [ ! -d html ]; then mkdir html; fi if [ -f "html/$1" ]; then rm "html/$1" fi cd html cp -s "../$1" "$1" ps2web "$1" if [ -n .captions ]; then echo 1>&2 Warning: \".captions\" file exists, not regenerating. else for fn in slide??.png; do echo "$fn ---- $2" >> .captions done fi shift; shift igal -c -r --title "$2" -k $* echo "Done!"