#!/bin/sh ################################################################################ ## lit2pdf ## ## By Peter Stewart (http://www.petermstewart.net) ## ## January 2009 ## ## ## ## Converts .lit (Microsoft Reader) files to PDF using ConvertLIT (clit), ## ## html2ps, and ps2pdf. ## ################################################################################ if [ $? -lt 1 ] ; then echo "Usage: lit2pdf file.lit" echo exit 1 fi # Change file extension OF=`echo $1 | sed 's/\.lit/\.pdf/'` TMPDIR=`mktemp -d` # Expand file into temporary directory clit "$1" $TMPDIR/temp/ # Convert HTML > PS > PDF html2ps $TMPDIR/temp/*.htm | ps2pdf - "$OF" # Clean up rm -rf $TMPDIR exit 0