#!/bin/sh
#
# $Id: iMainIndex,v 1.1 2001/11/20 03:11:28 vijoy Exp vijoy $
#
# Cleanup and create input
rm -rf index.html
inputfile=`ls `
# Creating the basic HTML template
echo "Creating index..."
echo "" > index.html
echo "
" >> index.html
echo "Contents and Index of this Photo Album
" >> index.html
echo "
" >> index.html
echo "" >> index.html
for img in $inputfile
do
name=`cat $img/index.html|grep "Images from"|cut -d ' ' -f 4-`
name=`echo $name|cut -d '<' -f 1|sed s/" category"//g`
fdate=`ls $img/*|grep $img|cut -d '/' -f 2- | cut -d '+' -f 1`
fdate=`echo $fdate|cut -d ' ' -f 1`
echo "- " >> index.html
echo ""$name"
| " >> index.html
echo "["$fdate"] |
" >> index.html
done
echo "
" >> index.html
echo "
" >> index.html
echo "© 2000-2001 Vijoy and Rachna Pandey
" >> index.html
echo "Photo album burnt on "`date`"" >> index.html
echo "" >> index.html