#!/usr/bin/perl
#########!/msrc/apps/bin/perl
#
# New frames code to eat latex2html output and write a frames document
#
# Ricky A. Kendall
#
# 3/19/98
#
# $Id$
#
# remove nwchem banner stuff 3/23/98
#
###@INC = ("/msrc/apps/perl-5.005/lib/5.00502","/usr/lib/perl5");
require File::Copy;
if (($ARGV[0] eq "") || ($ARGV[1] eq "")) {
print "Usage: write_frames.pl document_name title_string\n";
exit(1);
}
else {
$document = $ARGV[0];
$title = $ARGV[1];
}
# figure_out where directory is:
#
$okay = 0;
if (-d "$document") {$okay++;}
if (-e "$document/index.html"){$okay++;}
if (-e "$document/$document.html"){$okay++;}
#print "okay is $okay \n";
if ($okay != 3) {
print "write_frames.pl: you must be running in the latex source directory\n";
print " where the latex2html directory $document exists\n\n";
exit(1);
}
if ($document eq "user") {
$bodystring = "
\n";
}
elsif ($document eq "prog") {
$bodystring = "\n";
}
else{
$bodystring = "\n";
}
# write index.html (frames document)
if (!(open(FINDEX,">$document/index.html"))){
die "write_frames.pl: could not open index.html for writing\n";
}
print FINDEX "\n\n $title \n\n";
print FINDEX "