# # Generate participants list from the 'participants.csv' sorted by # name, generate worshops main page # BEGIN { FS=";" # create backup copy while (getline < "particip.html" != 0) print $0 > "particip.html~" close "particip.html" close "particip.html~" # read in the header while (getline < "Head.html" != 0) Head[++i] = $0 close "Head.html" Nhdln = i # read in the footer while (getline < "Foot.html" != 0) Foot[++Nftln] = $0 close "Foot.html" # start creating page for (i=1; i<=Nhdln; i++) { line = Head[i] if (index(line, "__title__")) sub("__title__", "ELAG 2001 - List of Participants", line) print line } # title, headlines print "" print "" print "\n" print "" print "" print "" print "" print "" } { NParticip++ # generate a line of Participants list print "\n" print "" print "" CountryAnchor = "countries.html#" $12 gsub(" ","_",CountryAnchor) print "" print "" print "" # count workshop participation WS1[$16]++ WS2[$17]++ # prepare list of workshop participants print $16 ";WS1;" $3 ";" $2 ";" $1 ";" $12 > "WS_Part.tmp" print $17 ";WS2;" $3 ";" $2 ";" $1 ";" $12 > "WS_Part.tmp" # count country statistics CountryCtr[$12]++ CountryName[$12] = $12 # prepare list of Board meeting participants # if ($18) BoardName[bctr++] = $1 " " $2 " " $3 ", " $5 ", " $12 } END { print "" # close the main table print "

List of Participants
#Name" print "Country" print "Workshops
" ++num "." $1 "" $2 " " $3 " " $12 "" $16 " (" $17 ")
" print "
" # create country statistics table print "\n" print "" for (ctr in CountryCtr) print CountryName[ctr] " ; " CountryCtr[ctr] > "ctry.tmp" while ("sort ctry.tmp" | getline != 0) { if (ictry++%4 == 0) print "" print "" } print "\n
Country statistics
" $1 "" $2 "
" print "
" # Create backup copy of workshops.html while (getline < "workshops.html" != 0) print $0 > "workshops.html~" close "workshops.html" close "workshops.html~" # start creating main workshops page for (i=1; i<=Nhdln; i++) { line = Head[i] if (index(line, "__title__")) sub("__title__", "ELAG 2001 - Workshops", line) print line > "workshops.html" } # title, headlines print "" > "workshops.html" print "" > "workshops.html" print "\n" > "workshops.html" print "" > "workshops.html" print "" > "workshops.html" print "" > "workshops.html" while (getline < "workshops.csv" != 0) { # create headers to be used in WS table ++NWshops wstitle[$1] = $2 print "" > "workshops.html" print "" > "workshops.html" print "" > "workshops.html" } close "workshops.csv" # footer of the workshops page print "
Workshops
WS
#
Workshop titleRegistered
participants
" $1 "." $2 > "workshops.html" if ($5) print "  " > "workshops.html" if ($6) print "   (" $6 ")" > "workshops.html" print "
" $3 " (" $4 ")" > "workshops.html" if ($7) print "
Location: " $7 > "workshops.html" print "
" WS1[$1] " (" WS2[$1] ")
\n" > "workshops.html" # insert the footer for (i=1; i<=Nftln; i++) print Foot[i] > "workshops.html" print "
" > "workshops.html" "date +'%a %d %b %Y %H:%M:%S'" | getline timestamp print "   Last updated: " timestamp " CET\n\n" > "workshops.html" # end of workshops main page creation #create workshop statistics table print "\n" print "" for (i=1; i" print "" } print "\n
Workshop statistics
" i ". " wstitle[i] "" WS1[i] " (" WS2[i] ")
" # print "
" # create Board Meeting table # print "\n" # print "" # for (i=0; i<=bctr; i++) { # if (i%2 == 0) print "" # print "" # } # print "
Board meeting
" BoardName[i] "
\n" # insert the footer for (i=1; i<=Nftln; i++) print Foot[i] print "
" "date +'%a %d %b %Y %H:%M:%S'" | getline timestamp print "   Last updated: " timestamp " CET\n\n" print NParticip " # " timestamp > "/www/cgi-bin/wwwcounter_2.3/data/ELAG2001.cnt" }