# # Generate one participants data from the 'participants.csv' # according to key passed by the calling routine # function btrim(s1) {while (substr(s1,1,1)==" ") s1=substr(s1,2) while (substr(s1,length(s1))==" ") s1=substr(s1,1,length(s1)-1); return s1} # BEGIN { FS=";" while (getline < "/www/www-data/elag2001/workshops.csv" != 0) workshops[$1] = $2 close "/www/www-data/elag2001/workshops.csv" # print "" print "ELAG 2001 participant data" print "" } ((substr($2,1,3) substr($3,1,3) substr($12,1,3))==par) { print "
" print "
\n  " $1 " " $2 " " $3 "
" print "
" $4 "
" $5 if (btrim($7) != "") print "
" $7 if (btrim($8) != "") print "
" $8 if (btrim($9) != "") print " POB " $9 print "
" $11 "  " $10 "
" $12 if (btrim($13) != "") print "
" $13 if (btrim($14) != "") print "   " $14 if (btrim($15) != "") print "
" $15 "
" print "

Workshop preferences:
  1. WS#" $16 " " workshops[$16] "
  2. WS#" $17 " " workshops[$17] "
" print "

Catering / excursion:
" if (($18)||($19)||($20)) print "
Lunch " if ($18) print " 6. " if ($19) print " 7. " if ($20) print " 8. " if (($18)||($19)||($20)) print "
" if ($21=="dinneryes") print "
Dinner " if ($23) print " (vegetarian)" if ($21=="dinneryes") print "
" if ($22=="HolnaYes") print "
Excursion
" print "
\n
" } END { "date +'%a %d %b %Y %H:%M:%S'" | getline timestamp print "
   Generated: " timestamp " CET\n\n" }