#!/bin/sh -x
F=choc.isbn
SF="ship/choc-library.html"
T="Chocolate Library"
cat > $SF <<EOF
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
  <head>
    <meta name="generator" content="thokbook">
    <title>$T</title>
  </head>
  <body>
    <h1>$T</h1>
    <p>This is my personal collection of Chocolate-related books, including 
       cookbooks, texts, and other books on the subject.</p>
    <dd>
EOF
for i in $(cat $F); do
  ISBN=$(eval echo $i)
  echo "$ISBN"
  # cookone $ISBN
  if [ -s "rawmarc/${ISBN}.marc" ]; then
    perl slurprecord.pl $ISBN
    cat cookmarc/${ISBN}-newfrag.html >> $SF
    cp "cookmarc/${ISBN}-full.html" "ship/marc${ISBN}.html"
  else
    echo "MISSED ONE: $ISBN"
  fi
done
cat >> $SF <<EOF
    </dd>
  </body>
</html>
EOF
