#
# This script generates html pages simulating PowerPoint presentation
# of a report of the ELAG Workshop number "wsn"
# It generates a title page named Ws"wsn".html and "last" html pages
# named frame1.html to frame"last".html
# The PowerPoint presentation pictures converted to gif format are
# expected to be found in the directory Workshop/Ws_Reports/Ws"wsn",
# the generated pages are placed to the same directory.
#
BEGIN {
FS = ";"
# generate title page
filenm= "Ws" wsn "/Ws" wsn ".html"
# read in the header
while (getline < "/www/www-data/elag2001/Workshop/Reports/RepHead.html" != 0) Head[++Nhdln] = $0
close "/www/www-data/elag2001/Workshop/Reports/RepHead.html"
# read in the footer
while (getline < "/www/www-data/elag2001/Workshop/Reports/RepFoot.html" != 0) Foot[++Nftln] = $0
close "/www/www-data/elag2001/Workshop/Reports/RepFoot.html"
# read in the workshop record
while (getline < "/www/www-data/elag2001/workshops.csv" != 0) {
if ($1 == wsn) {
title = $2
author = $3
affil = $4
}
}
close "/www/www-data/elag2001/workshop.csv"
#
"date +'%d-%m-%Y'" | getline DCdate
# start creating page
for (i=1; i<=Nhdln; i++) {
line = Head[i]
if (index(line, "__title__")) sub("__title__", title , line)
if (index(line, "__date__")) sub("__date__", DCdate, line)
if (index(line, "__author__")) sub("__author__", author, line)
if (index(line, "__affil__")) sub("__affil__", affil, line)
if (index(line, "__wsn__")) sub("__wsn__", wsn, line)
print line > filenm
}
# generate list of slides
for (i=1; i<=last; i++) {
print "" i " slide" i "title
" > filenm
}
# right hand side of titlepage
print "\n
" > filenm print "