diff --git a/doc/htmlize b/doc/htmlize index eb47acf487..d8eb69196c 100755 --- a/doc/htmlize +++ b/doc/htmlize @@ -9,7 +9,6 @@ if ($#argv != 1) then exit 1 endif - set WWWDIR=/msrc/doc/www/changes/docs/nwchem/doc set TMP=tmp.$$ @@ -26,6 +25,8 @@ foreach document ($1) echo " Cleaning and making $document.ps" +goto doit + make clean >& /dev/null make $document.ps >& $document.latex.log @@ -145,11 +146,38 @@ foreach document ($1) exit 1 endif +# Now run Pawel's magic perl script to make the frames +doit: + if (! $?NWCHEM_TOP ) then + echo " NWCHEM_TOP is not defined ... cannot generate frames" + else if (! -e $NWCHEM_TOP/doc/make_manual.pl) then + echo " $NWCHEM_TOP/doc/make_manual.pl missing ... cannot generate frames" + else + echo " Making frames" + pushd $WWWDIR/$document > /dev/null + if ($document == "user") then + set title = "NWChem User Manual" + else if ($document == "prog") then + set title = "NWChem Programmers Manual" + else + set title = "NWChem Manual" + endif + + $NWCHEM_TOP/doc/make_manual.pl $document.html "$title" + + if ($status != 0) then + echo " Making the frames failed" + endif + + popd > /dev/null + endif + + # Hopefully all is OK echo " Done with $document" - /bin/rm -f $TMP $document + /bin/rm -rf $TMP $document end diff --git a/doc/make_manual.pl b/doc/make_manual.pl new file mode 100755 index 0000000000..dbf8e48c56 --- /dev/null +++ b/doc/make_manual.pl @@ -0,0 +1,192 @@ +#!/msrc/apps/bin/perl5 +########################### +# latex2HTML wrapper script +# Pawel Wolinski +# pwolinsk@comp.uark.edu +# 5/21/97 +########################### + +# +# This script takes the output of htmlize (munged latex2html) +# and adds the frame based indexing +# + + +$input_dir ="."; +$output_dir="."; +$title="NWChem User Documentation"; + +if ($ARGV[0] eq "") {&print_usage;exit(0);} else {$start_file=$ARGV[0];} +if ($ARGV[1] ne "") {$title=$ARGV[1];} + +&make_contents_cover($input_dir,$output_dir,$start_file); +&make_manuals($output_dir,$title); + + + + + +#-----------------------subroutines------------------- +sub make_contents_cover { +local ($in_dir,$out_dir,$start_f)=@_; +$r1=<.*Next:.* +.*Up:.* +.*Previous:.**. +EOT + +$r2=< +var ontop=true; +function focus_me() { + if (ontop) {self.focus();} +} +function toggle_ontop() { + if (ontop==true) ontop=false; + else ontop=true; + focus_me(); +} +function index() { + if (self.name=="contentsWin") { + self.opener.location="index.html"; + self.close(); + } +} +function windows_man() { + if (self.name=="contents_frame") { + top.location="windows_man.html"; + } +} + +EOT2 + +$r3=< + + + + + + + +EOT5 + if (!(open(F,"$in_dir/node2.html"))) { + print stderr "make_manual: Cannot find the contents file \"node2.html\" - terminating!\n\n"; + exit(0); + } + close(F); + + if (!(open(F,"$in_dir/$start_f"))) { + print stderr "make_manual: Cannot find the start file \"$start_f\" - terminating!\n\n"; + exit(0); + } + close(F); + + $contents=`cat $in_dir/node2.html`; + $cover =`cat $in_dir/$start_f`; + + $contents=~s/$r1//g; + $contents=~s/
//g; + $contents=~s/

//ig; + + $cover =~s/

*.<\/H2>//g; + $cover =~s/