# # Generate logistics data about participants from the 'participants.csv' # BEGIN { FS=";" # 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 - Logistics", line) print line } # title, headlines print "" print "\n" print "\n" print "" print "" print "" print "" print "" print "\n" print "" print "" print "" } { NParticip++ # generate statistical data if ($18 == "Yes") ++Lunch6 if ($19 == "Yes") ++Lunch7 if ($20 == "Yes") ++Lunch8 if ($21 == "dinneryes") ++Dinner if ($22 == "HolnaYes") ++Holna if ($23 == "Yes") ++veggie } END { print "" # print results print "" printf "", Lunch6/NParticip*100, Lunch7/NParticip*100, Lunch8/NParticip*100, Dinner/NParticip*100, veggie/NParticip*100, Holna/NParticip*100 # close the main table print "

Logistic data

ParticipantsLunchDinnerveggieHolna
June 6June 7June 8
" NParticip "" Lunch6 "" Lunch7 "" Lunch8 "" Dinner "" veggie "" Holna "
percent%6.2f%6.2f%6.2f%6.2f%6.2f%6.2f
" print "" # 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" # update info at Social Events page while (getline < "social.html" != 0) { print $0 > "social.html~" if (match($0,"