#!/bin/sh # RTF.sum # # D. Wessels 3/13/95 rbow_tmp=$TMPDIR/rbow$$ # Note, we have to do bizarre redirections because # rbmaker prints a heading to stdout which confuses # essence. We could redirect everything from # rbmaker to /dev/null, but we do want to see important # errors. # Ack. This is because some Mac software seems to export RTF with CR's only # and no LF's!! So we replace a \r not followed by a \n with a \n. rtf_tmp=$TMPDIR/rtf$$ perl -pe 's/\r([^\n])/\n$1/g;' < $1 > $rtf_tmp # Convert the RTF into Rainbow compliant SGML # $HARVEST_HOME/lib/gatherer/rbmaker \ -in $rtf_tmp \ -out $rbow_tmp \ -figdir $TMPDIR \ -datadir $HARVEST_HOME/lib/gatherer/rbmaker.dat \ -tempdir $TMPDIR \ 2>&1 1>/dev/null | grep -v '% completed' 1>&2 # cleanup garbage # rm -f graph???.eqn graf????.pct # Run the SGML summarizer with the Rainbow DTD # SGML.sum Rainbow $rbow_tmp && rm -f $rbow_tmp $rtf_tmp