
# This says how to convert files of certain types where we don't know
# in advance what the result will be.  For example, if we find a 
# gzip-compressed file, we know we should uncompress it, but then we 
# need to look at the result to decide what to do next.
gz->???         gzip -dc %I > %O
Z->???          gzip -dc %I > %O

# This says how to convert files of one type to another type
# The 'print' command will automatically find the shortest sequence
# of transformations for turning the source file into a printable file.

# The usual suspects
ps->pcl         gs -sDEVICE=ljet4 -sOutputFile=%O -q -dNOPAUSE -dSAFER %I </dev/null >/dev/null
dvi->ps         dvips -o %O %I
dvi->pcl        dvilj4 -e%O %I
# latex->dvi      latex  --interaction=batchmode %I; rm %I:.aux %I:.log; mv %I:.dvi %O; 
latex->dvi      cd `dirname %I`; mv %I %I:.tex; latex --interaction=batchmode %I:.tex || cat %I:.log; mv %I:.dvi %O; rm -f %I:.aux %I:.log %I:.tex
tex->dvi        tex %I; rm `basename %I .tex`.aux `basename %I .tex`.log; mv `basename %I .tex`.dvi %O; 
texi->dvi       tex %I; mv `basename %I .tex`.dvi %O
txt->ps         txttops < %I > %O 2> /dev/null
pdf->ps         /src/xpdf-0.90/xpdf/pdftops %I %O

# Various image types
jpg->ppm        djpeg %I > %O
gif->ppm        giftopnm < %I > %O
ppm->ps         pnmtops < %I > %O
ppm->pcl        ppmtolj -delta -resolution 600 %I > %O

# HTML?
html->ps        htmltops %I; mv `basename %I .html`.ps %O

# Unix manual files
1->ps           groff -mandoc %I > %O
2->ps           groff -mandoc %I > %O
3->ps           groff -mandoc %I > %O
4->ps           groff -mandoc %I > %O
5->ps           groff -mandoc %I > %O
6->ps           groff -mandoc %I > %O
7->ps           groff -mandoc %I > %O
8->ps           groff -mandoc %I > %O
man->ps         groff -mandoc %I > %O
1->pcl          groff -mandoc -Tlj4 %I > %O
2->pcl          groff -mandoc -Tlj4 %I > %O
3->pcl          groff -mandoc -Tlj4 %I > %O
4->pcl          groff -mandoc -Tlj4 %I > %O
5->pcl          groff -mandoc -Tlj4 %I > %O
6->pcl          groff -mandoc -Tlj4 %I > %O
7->pcl          groff -mandoc -Tlj4 %I > %O
8->pcl          groff -mandoc -Tlj4 %I > %O
man->pcl        groff -mandoc -Tlj4 %I > %O

# Perl source code and documentation
pod->3          pod2man < %I > %O
pm->3           pod2man < %I > %O
pl->txt         cat %I > %O
pl->ps          a2ps -l66 -nL -p -nP -1 -Xletter %I > %O 2> /dev/null

# Microsoft Word Files
doc->latex      wvLatex %I
# doc->html      wvHtml %I

# fake type for printing email files
email->latex    /usr/local/bin/emailtolatex < %I > %O
