#!/bin/sh -x
F=scan-1999-10-24.csv
SF="ship/fe-library.html"
cat > $SF <<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
  <head>
    <meta name="generator" content="thokbook">
    <title>FastEngines Library</title>
  </head>
  <body>
    <h1>FastEngines Library</h1>
    <p>These are some of the books available around the FastEngines 
       Cambridge, MA office.  It is not complete, but is at least a
       place to look before buying new ones.</p>
    <ul>
EOF
for i in $(awk -F, '/fe bessie books/ { print $3 }' < $F | grep -v '"NR"'); do
  ISBN=$(eval echo $i)
  echo "$ISBN"
  # cookone $ISBN
  if [ -s "rawmarc/${ISBN}.marc" ]; then
    perl slurprecord.pl $ISBN
    cat cookmarc/${ISBN}-frag.html >> $SF
    cp "cookmarc/${ISBN}-full.html" "ship/marc${ISBN}.html"
  fi
done
cat >> $SF <<EOF
    </ul>
  </body>
</html>
EOF
