#!/usr/bin/perl

# Name:   webify.pl
# Author: John F. Hagan
# Date:   01/99 
#
# Purpose: to take Harry Lincoln's SOURCES SCRIPT file and separate each	
#          record into its respective RISM.  Lines are italicized properly 
#          first.
#

$input     = "/local/www/faculty/lincoln/sources.script";
$output    = "/local/www/faculty/lincoln/sources.html";

open(SOURCES, "$input");
open(OUTPUT,">>$output");

print OUTPUT <<TOPOFPAGE;
<html>
<head>
<title>The Latin Motet: Indexes to Printed Collections, 1500-1600</title>
</head>
<body bgcolor="#FFFFFF">
<center>
<h1>The Latin Motet: Indexes to Printed Collections, 1500-1600</h1>
<h2>Index to Sources</h2>
</center>
TOPOFPAGE

while (<SOURCES>) {
   s/\+/<\/I>/;          #substitute </I> for 1st occurrence of + 
   s/\+/<I>/;            #substitute <I>  for 2nd occurrence of +
   s/\+/<\/I>/;          #substitute </I> for 3rd occurrence of + 
   s/^\.us on/<I>/;      #substitute <I>  for .us on 
   s/^\.us off/<\/I>/;   #substitute </I> for .us off
   s/^\.bd on/<B>/;      #substitute <B>  for .bd on
   s/^\.bd off/<\/B>/;   #substitute </B> for .bd off
   s/^\.fo on/<\/PRE>/;  #substitute </PRE> for .fo on
   s/^\.fo off/<PRE>/;   #substitute <PRE> for .fo off
   s/^\.bi on//;         #substitute null for .bi on
   s/^\.bi off//;        #substitute null for .bi off
   s/^\.sk/<P>/;         #substitute <P> for .sk
   s/\{/&nbsp\;&nbsp\;&nbsp\;/g;   #substitute &nbsp;&nbsp;&nbsp; for { globally
   s/@/&nbsp\;/g;         #substitute &nbsp; for @ globally
   
   
   print(OUTPUT);
   }

print OUTPUT <<ENDOFPAGE;
<p>
Information compiled by 
<a href="mailto:bg0056\@bingvmb.cc.binghamton.edu">Harry B. Lincoln</a><br>
Professor Emeritus<br>
Department of Music<br>
Binghamton University<br>
</body>
</html>
ENDOFPAGE
