#!/bin/tcsh # # example: # ../../bin/make-index {DSC,dsc}?????.{JPG,jpg} *.{MPG,mpg} > index.html # author: Yann LeCun, AT&T Labs. http://www.research.att.com/~yann # set verb="" set allinputs= ( $* ) echo "" if ( -f title.txt ) cat title.txt echo "" echo "" if ( -f title.txt ) then echo "

" cat title.txt echo "

" endif echo '

[BACK to MENU]  [HELP]

' if ( -f readme.txt ) then cat readme.txt echo "

" endif set z=0 foreach i ( $allinputs ) echo "" echo "" set thumb=$i:r:r.t.jpg if ( -f $thumb ) then set theight=`rdjpgcom -verbose $thumb | head -1 | cut -d" " -f6 | cut -dh -f1` set twidth=`rdjpgcom -verbose $thumb | head -1 | cut -d" " -f4 | cut -dw -f1` echo "" set exte=$i:e if ( ($exte == "mpg") || ($exte == "MPG") ) then set size=`cat $i | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "" else echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" echo "" endif echo "
" echo "" else echo "" echo "" endif echo "
" echo "\" echo "
" if ( -f $i:r:r.h.djvu ) then set size=`cat $i:r:r.h.djvu | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "\" else echo "" endif echo "" if ( -f $i:r:r.m.djvu ) then set size=`cat $i:r:r.m.djvu | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "\" else echo "" endif echo "" if ( -f $i:r:r.l.djvu ) then set size=`cat $i:r:r.l.djvu | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "\" else echo "" endif echo "
" set exte=$i:e if ( ($exte == "jpg") || ($exte == "JPG") ) then set size=`cat $i | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "\" else echo "" endif echo "" if ( -f $i:r:r.m.jpg ) then set size=`cat $i:r:r.m.jpg | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "\" else echo "" endif echo "" if ( -f $i:r:r.l.jpg ) then set size=`cat $i:r:r.l.jpg | wc -c`; @ size=$size / 1024; set size="[$size KB]" echo "\" else echo "" endif echo "
" @ z=$z + 1 if ( $z == 5 ) then echo "
" set z=0 endif end echo "

" if ( -f index.l.djvu ) then echo "DjVu Photo Album (low resolution 640x480)
" endif if ( -f index.m.djvu ) then echo "DjVu Photo Album (medium resolution 800x600)
" endif if ( -f index.h.djvu ) then echo "DjVu Photo Album (high resolution 1600x1200)
" endif echo "

" echo '

[BACK to MENU]  [HELP]
' echo ""