# This script creates the html tips and hints page for external-fee use.
# Author: Cynthia Roush
# Creation Date: 07/94
# Change History:
# 9/8/94 CR Add REFPATH variable. So that can easily
# change path from /u/hsim/other.
# Also separated scripts for internal html
# menu and external-fee html menu.
# 9/19/94 CR Completed implementation of REFPATH and other
# variables.
# 9/19/94 CR Don't use US-specific faxes; remove my name and
# address from end of created page.
# 3/30/95 CR Changed header file
. /u/hsim/other/fax.data/scripts/setvars
cd $TMPDIR
tmp=tmp$$
tmp1=tmp1$$
# path to be used in hrefs; need backslashes because will be used with sed
CNTRY=usa
RBIN="\/rbin-$CNTRY"
GET_R_OBJ="$RBIN\/getrobj.pl"
REFPATH="$GET_R_OBJ\?\/rdocs-usa\/tips\/"
# remove comments, links, and limited distribution faxes
sed "/^#/d" $FAXDB > $tmp
sed "/ $tmp1
sed "/! limited/d" $tmp1 > $tmp
sed "/! US /d" $tmp > $tmp1
mv $tmp1 $tmp
# sort by date
sort -r -t ! -o $tmp1 -k $DT_FIELD $tmp
mv $tmp1 src.dt.$$
for COMPGRP
in gen anz cmd krn zap lng tcp sna
# in gen anz cmd krn zap lng gph tcp sna
do
# Separate component groups
grep "! $COMPGRP !" src.dt.$$ > group$$
# Separate file name and doc title and revision date
cut -c$FN_COLS group$$ > fn$$
cut -c$TTL_COLS group$$ > ttl$$
cut -c$DT_COLS group$$ > dt$$
# Remove blanks around file names
/u/hsim/execs/endblanks fn$$
sed "s/^ //" fn$$ > $tmp
mv $tmp fn$$
# copy file name column because need it twice
cp fn$$ fn2$$
# add html syntax
sed "s/^/ $tmp
sed "s/$/>/" $tmp > fn$$
sed "s/$/)<\/a>/" fn2$$ > $tmp
sed "s/^/(/" $tmp > fn2$$
# add emphasis to title (WILL DELETE WHEN CERTAIN NOT NEEDED)
# sed "s/^//" ttl$$ > $tmp
mv ttl$$ $tmp
# sed "s/$/<\/strong><\/a>/" $tmp > ttl$$
sed "s/$/<\/a>/" $tmp > ttl$$
# change format of date
sed "s/^ *\(..\)\(..\)\(..\)/\2\/\3\/\1/" dt$$ > $tmp
mv $tmp dt$$
# put file names and doc titles and dates together
paste -d " " fn$$ dt$$ ttl$$ > all$$
# add rest of link syntax
case $COMPGRP in
gen)
TITLE="General"
;;
anz)
TITLE="Analysis/Install"
;;
cmd)
TITLE="Commands"
;;
krn)
TITLE="Kernel"
;;
lng)
TITLE="Language"
;;
zap)
TITLE="Printer/Async"
;;
tcp)
TITLE="Communications"
;;
sna)
TITLE="SNA"
;;
gph)
TITLE="Graphics"
;;
esac
echo "" >> final.dt.$$
echo "" >> final.dt.$$
cat all$$ >> final.dt.$$
echo "
" >> final.dt.$$
done
# Add header and footer information
/u/hsim/execs/endblanks final.dt.$$
#cat $EXECDIR/header.www.html final.dt.$$ $EXECDIR/footer.www.html > $HTMLDIR/faxes.fee.html
cat $EXECDIR/header.www.reg.html final.dt.$$ $EXECDIR/footer.www.html > $HTMLDIR/faxes.fee.html
rm $TMPDIR/*$$