# # Generate report template for the respective institution/participant # function repchar(s1) { s2="" for (i=1; i<=length(s1); i++) { s = index(" /().'",substr(s1,i,1))>0 ? "_" : substr(s1,i,1) s2 = s2 s } return s2 } BEGIN { FS=";" InstType["NatLib"] = "National Library" InstType["UniLib"] = "University Library" InstType["ResLib"] = "Research Library" InstType["Library"] = "Other Library" InstType["Consort"] = "Consortium" InstType["SWDevelop"] = "Software Developer" InstType["Ministry"] = "Ministry/Government" InstType["Consult"] = "Consultant" InstType["Other"] = "Other" filename= "/www/www-data/elag2001/Templates/" par ".html" # read in the header while (getline < "/www/www-data/elag2001/RepHead.html" != 0) Head[++Nhdln] = $0 close "/www/www-data/elag2001/RepHead.html" # read in the footer while (getline < "/www/www-data/elag2001/RepFoot.html" != 0) Foot[++Nftln] = $0 close "/www/www-data/elag2001/RepFoot.html" # "date +'%d-%m-%Y'" | getline DCdate } { RepCode = repchar(substr($12,1,10) substr($5,1,25)) RepAuth = repchar(substr($2,1,5) substr($3,1,5)) if ( (RepCode == par) && (RepAuth == auth) ) { # start creating page for (i=1; i<=Nhdln; i++) { line = Head[i] if (index(line, "__title__")) sub("__title__", "ELAG 2001 - Progress Report of the " $5, line) if (index(line, "__date__")) sub("__date__", DCdate, line) if (index(line, "__name__")) sub("__name__", $2 " " $3, line) if (index(line, "__inst__")) sub("__inst__", $5, line) print line } print "

" $5 " Progress Report 2001

    " print "

  1. Institution
  2. " $5 "
    " $8 if ($9) print ", POB " $9 print "
    " $10 ",  " $11 "  " $12 print "

    ELAG Contact Person:
    " $1 " " $2 " " $3 if ($4) print " (" $4 ")" print ", " $15 " , phone:" $13 if ($14) print ", fax:" $14 print "

    Institution Type: " InstType[$6] "

    Mission Statement
    " print "\n" print "

  3. Computer networks and Internet connectivity
  4. " print "\n" print "

    1. In general HW, SW
    2. " print "

    3. New HW, SW; connectivity upgrades
    4. " print "

    " print "

  5. Library automation
  6. " print "\n" print "
      " print "

    1. In general HW/SW
    2. " print "

    3. New HW, SW, other
    4. " print "
    " print "

  7. Union Catalogue
  8. " print "" print "\n" print "
      " print "

    1. Software used
    2. " print "

    3. New features
    4. " print "
    " print "

  9. Digital Library
  10. " print "\n" print "
      " print "

    1. Based on your own production of digital documents
    2. " print "

    3. If so, what is new in your digitization programmes?
    4. " print "

    5. Based on external sources
    6. " print "

    7. Important commercial web services accessible to your users
    8. " print "
    " print "

  11. New in-house databases
  12. " print "\n" print "

  13. Special web services
  14. " print "\n" print "

  15. Electronic document delivery services
  16. " print "\n" print "

  17. Research and technology development projects
  18. " print "\n" print "

  19. Other important projects
  20. " print "\n" print "
" print "

Reported by " $2 " " $3 print "<" $15 ">" print "\n" print "

Your_home, 24 April 2001" # close the main table print "" # insert the footer for (i=1; i<=Nftln; i++) print Foot[i] print "" "date " | getline timestamp print "   Generated: " timestamp "" print "\n\n" # Create a permanent template copy for (i=1; i<=Nhdln; i++) { line = Head[i] if (index(line, "__title__")) sub("__title__", "ELAG 2001 - Progress Report of the " $5, line) if (index(line, "__date__")) sub("__date__", DCdate, line) if (index(line, "__name__")) sub("__name__", $2 " " $3, line) if (index(line, "__inst__")) sub("__inst__", $5, line) print line > filename } print "

" $5 " Progress Report 2001

    " > filename print "

  1. Institution
  2. " $5 "
    " $8 > filename if ($9) print ", POB " $9 > filename print "
    " $10 ",  " $11 "  " $12 > filename print "

    ELAG Contact Person:
    " $1 " " $2 " " $3 > filename if ($4) print " (" $4 ")" > filename print ", " $15 " , phone:" $13 > filename if ($14) print ", fax:" $14 > filename print "

    Institution Type: " InstType[$6] > filename print "

    Mission Statement
    " > filename print "\n" > filename print "

  3. Computer networks and Internet connectivity
  4. " > filename print "\n" > filename print "

    1. In general HW, SW
    2. New HW, SW; connectivity upgrades
    3. " > filename print "

    " > filename print "

  5. Library automation
  6. " > filename print "\n" > filename print "
      " > filename print "

    1. In general HW/SW
    2. " > filename print "

    3. New HW, SW, other
    4. " > filename print "
    " > filename print "

  7. Union Catalogue
  8. " > filename print "" > filename print "\n" > filename print "
      " > filename print "

    1. Software used
    2. " > filename print "

    3. New features
    4. " > filename print "
    " > filename print "

  9. Digital Library
  10. " > filename print "\n" > filename print "
      " > filename print "

    1. Based on your own production of digital documents
    2. " > filename print "

    3. If so, what is new in your digitization programmes?
    4. " > filename print "

    5. Based on external sources
    6. " > filename print "

    7. Important commercial web services accessible to your users\n
    " > filename print "

  11. New in-house databases
  12. " > filename print "\n" > filename print "

  13. Special web services
  14. " > filename print "\n" > filename print "

  15. Electronic document delivery services
  16. " > filename print "\n" > filename print "

  17. Research and technology development projects
  18. " > filename print "\n" > filename print "

  19. Other important projects
  20. " > filename print "\n" > filename print "
" > filename print "

Reported by " $2 " " $3 > filename print "<" $15 ">" > filename print "\n" > filename print "

Your_home, 24 April 2001" > filename # close the main table print "" > filename # insert the footer for (i=1; i<=Nftln; i++) print Foot[i] > filename print "" > filename "date " | getline timestamp print "   Generated: " timestamp "" > filename print "\n\n" > filename close filename # insert Template code & Author name to CountryInst.csv filename = "/www/www-data/elag2001/CountryInst.csv" while (getline < filename != 0) { ReportStatus[$1] = $2 ReportAuthor[$1] = $3 } close filename ReportStatus[par] = "T" ReportAuthor[par] = RepAuth system ("cp " filename " " filename "~") for (i in ReportStatus) print i ";" ReportStatus[i] ";" ReportAuthor[i] > filename close filename system ("sort -o " filename " " filename) } }