# # Generate workshop participants lists # BEGIN { FS=";" while (getline < "Head.html" != 0) Head[++Nhdln] = $0 close "Head.html" while (getline < "workshops.csv" != 0) workshops[$1] = $0 close "workshops.csv" # read in the footer while (getline < "Foot.html" != 0) Foot[++Nftln] = $0 close "Foot.html" } { if (lastfld1!=$1) { if ($1!=1) { print "" > wsfilename print "" > wsfilename print "" > wsfilename # insert the footer for (i=1; i<=Nftln; i++) print Foot[i] > wsfilename print "
" > wsfilename "date +'%a %d %b %Y %H:%M:%S'" | getline timestamp print "   Last updated: " timestamp " CET\n\n" > wsfilename close wsfilename } wsfilename = "ws" $1 ".html" lastfld1 = $1 lastopt = "WS1" for (i=1; i<=Nhdln; i++) { line = Head[i] if (index(line, "__title__")) sub("__title__", "ELAG 2001 - Workshop " $1 " Participants", line) print line > wsfilename } print "" > wsfilename n = split(workshops[$1], wsfld) print "" > wsfilename print "" > wsfilename print "" > wsfilename print "" > wsfilename print "" > wsfilename print "" > wsfilename print "" > wsfilename print "" > wsfilename print "

Workshop # " $1 ": " wsfld[2] "
" wsfld[3] ", " wsfld[4] "
Workshop paper " > wsfilename if (wsfld[5]) print "  " > wsfilename if (wsfld[6]) print "   (" wsfld[6] ")" > wsfilename print"

First choice by:Second choice by:
" > wsfilename } if (lastopt!=$2) { lastopt = $2 print "" > wsfilename } print $5 " " $4 " " $3 ", " $6 "
" > wsfilename } END { print "" > wsfilename print "
" > wsfilename # insert the footer for (i=1; i<=Nftln; i++) print Foot[i] > wsfilename print "
" > wsfilename "date +'%a %d %b %Y %H:%M:%S'" | getline timestamp print "   Last updated: " timestamp " CET\n\n" > wsfilename close wsfilename }