#!/usr/bin/perl# massage program data created by FMP4 export# mod from ahtml-pgm.v2.pl on /u/cef99/pgmprint "\nNASUG'2001 ahtml-pgm v2.1\n\n";print "C F Baum  Jan 2001\n\n";print "session data file : ";chop($infilename=<STDIN>);open(IN,$infilename) || die "Cannot open $infilename for input";open(OUTS,'>nasug2001.pgm.html') || die "Cannot open nasug2001.pgm.html for output";#print OUTS "<html><title>NASUG'2001 Program</title><body bgcolor=fffefe>\n";require 'ctime.pl';$Date= &ctime(time);print OUTS "<p><h2>First North American Stata Users' Group Meeting<br></h2><h3> Preliminary Program </h3>\n<big>Revised : $Date</big>\n"; chop(@strings=<IN>);$lines=0;$snro=0;foreach(@strings) {   ($ti,$au,$af,$em,$seqnr,$abst,$sdt,$stm,$sti)=split(/\t/,$_);#  print "$sdt $stm $ti\n";   (@au)=split(/\x1d/,$au);   (@af)=split(/\x1d/,$af);   (@em)=split(/\x1d/,$em);#   (@or)=split(/\x1d/,$org);#   (@oa)=split(/\x1d/,$orgaf);   $nau=@au;    $naf=@af;   $nem=@em;#   $nor=@or;#   $noa=$oa;   $snr=int($seqnr);   if ($snr != $snro) {   		print OUTS "<p><hr><h3>Session $snr, $sdt, $stm  <em>$srm</em> <br>\n<i>$sti</i></h3><hr>\n";#   		print OUTS "&nbsp;&nbsp;&nbsp;$sti<p>\n";   		&ac($chr);   		&ac($chraf);#   		print OUT "<b>Chair:  $chr, </b>$chraf\n";#   		if ($nor>0) { print OUT "<table cellspacing=0>\n"; $tx="Organized by: "; for ($i=1;$i<=$nor;$i++) {#   			&ac($or[$i-1]);#   			&ac($oa[$i-1]);#   			print OUT "<tr><td width=80><em>$tx</td><td> $or[$i-1], <I>$oa[$i-1]</I></em></td></tr>\n";#   			$tx=" ";#   					} #   					print OUT "</table>\n";#   		} else   { print OUT "<br>\n"; }   		$snro = $snr;   	}#   	$handle=100*($snr+$ois/100);    print OUTS "&nbsp;<br><table><tr><td width=5></td><td><b><A HREF=\"http://ideas.uqam.ca/ideas/data/Papers/bocasug01$seqnr.html\">$ti</a></b></td></tr></table>\n";    for ($i=1;$i<=$nau;$i++) {	   &ac($au[$i-1]);	   &ac($af[$i-1]);	   print OUTS "\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$au[$i-1], <I>$af[$i-1]</I> <A HREF=\"mailto:$em[$i-1]\"><TT>$em[$i-1]</TT></A><br>";	   }	print OUTS "\n";	$lines++;}close(IN);#close(OUT);print OUTS "<hr></body></html>\n";close(OUTS);print "Papers processed: $lines\n";exit;sub new_blk{	if(@_[0]==0){return;}	$pref="";	if (@_[0]<10) { $pref="0"; } 	$fn="sb" . $pref . @_[0] . ".html";	print "now opening $fn for block @_[0]\n";	close(OUT);	open(OUT,">$fn");	print OUTS "<h4><a href='\#s.@_[0]'>Concurrent Sessions @_[0]: @_[2] @_[3]</a></h4><p>\n";	print OUT "<h2><a name='s.@_[0]'>\n<hr><br><FONT COLOR=#FF0000>Concurrent Sessions, Block @_[0]: @_[2] @_[3]</FONT></a></h2>\n";	@_[1]=$pref . @_[0];}sub ac{	$_=@_[0];	s/Ù/&ccedil;/g;	s/Ú/&eacute;/g;	s/÷/&oacute;/g;	s/¶/&egrave;/g;	s/½/&aacute;/g;	s/À/&oslash;/g;	s/Ã/&agrave;/g;	s/É/&auml;/g;    s/û/&ouml;/g;    s/·/&Ouml;/g;	s/Ä/&uuml;/g;	s/º/&Uuml;/g;    s!\xCA! !g;    s/``/"/g;    s/ÍÍ/"/g;    s/''/"/g;	$_[0]=$_;}