#/usr/local/bin/perl
die "usage: $0 webpagename ..\n" unless @ARGV;
$|=1;

$base_href="https://atmos.nmsu.edu/planetary_datasets";
$now=`date`;
 chomp($now);
 print "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2 Final//EN\">
   <html>
   <head>
   <title>$ARGV[0]</title>
   <base href=\"$base_href/$ARGV[0]\">
   <meta http-equiv=\"Pragma\" content=\"no-cache\">
     <meta name=\"Creation date\" content=\"Feb 7th, 2002\">
     <meta name=\"Last update\" content=\"$now\">
     <meta name=\"Author\" content=\"\">
     <meta name=\"keywords\" content=\"Saturn, Neptune, Uranus, zonal winds, gra
ph\">
<meta http-equiv=\"Content-Type\" content=\"text/html\">
   </head>
   <body bgcolor=\"white\" text=\"#00000\" link=\"#007050\" vlink=\"#000080\" al
ink=\"maroon\">
   <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
   <td width=\"180\" align=\"center\" valign=\"top\" bgcolor=\"blue\">
    <span style=\"font-size:12.0pt;font-family:&quot;Arial&quot;;mso-fareast-fon
t-family:&quot;Times New Roman&quot;;mso-ansi-language:EN-US;mso-fareast-languag
e: EN-US;mso-bidi-language:AR-SA\">

   </span><p align=\"center\"><font color=\"white\">
   <a href=\"../planetary_datasets/logo.jpg\"><img src=\"../planetary_datasets/l
ogo.jpg\" v:shapes=\"_x0000_i1025\" width=\"199\" height=\"115\"></a>
   <a href=\"../planetary_datasets/main.html\" color=\"white\"> <strong>
<font face\"Times New Roman\" color=\"white\">Planetary Atmosphere's Datasets</f
ont></strong></p>

   <hr noshade align=\"center\" size=\"5\">
   <hr noshade align=\"center\" size=\"3\" width=\"70%\">";

open(README, "perl generatebar.pl |") or die "Can't open $!\n";

while(<README>){
 $line .= $_;
 if($line ne ''){
 print $line;}
 $line = '';

}

close(README);
print "
<br>
    <br>

    </font></td>

    <td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td valign=\"top\"><h1><font face=\"arial\" size=\"5\"><i>";
    open(README, "< $ARGV[0]") or die "Can't open $!\n";
    while(<README>){
    
      $line .= $_;
      if($line ne '') {
       @ar = split(";", $line);
      }
      print "<a href=\"$ar[0]\">\n";
      print "<strong><font face=\"Times New Roman\" color=\"blue\">";
      print "$ar[1]</strong></font><a>\n";
      print $ar[2];
      
      $line = '';
      print "<br>";
      
    }
    close(README);
    print "
    </td></tr></table>
</body>
</html>";
