CoCalc Public Fileswww / sga / sga / scripts / makethumbindexOpen in with one click!
Author: William A. Stein
1
#!/bin/sh
2
3
#############################################################
4
# Make a thumbnail index
5
#
6
# Call with something like makethumbindex *.tif
7
#
8
# William Stein, 10/29/00
9
#############################################################
10
11
book=`basename \`pwd\``
12
13
14
echo \<html\>
15
echo \<title\>SGA $book\</title\>
16
echo \<LINK REL=STYLESHEET TYPE=\"text/css\" HREF=\"../sga.css\" TITLE=\"index.html\"\>
17
echo \<body\>
18
echo \<center\>
19
echo \<h1\>SGA $book\</h1\>
20
echo \</center\>
21
22
echo \<a href=\"../index.html\"\>[Up]\</a\>\<hr\>
23
24
i=0
25
echo \<table\>\<tr\>
26
27
for file in $*
28
do
29
base=`basename $file tif`
30
thumb=thumb_"$base"jpeg
31
html="$base"html
32
name=`basename $base .`
33
34
echo \<td\>\<table\>\<tr\>\<td\>\<a href=$html target=\"_new\"\>
35
echo \<img align=bottom src=$thumb\>\</a\>\</td\>\</tr\>
36
echo \<tr\>\<td\>$name\</td\>\</tr\>\</table\>\</td\>
37
38
i=`echo "($i + 1) % 6" | bc`
39
if test $i -eq 0; then
40
echo \</tr\>\<tr\>
41
fi
42
done
43
44
echo \</table\>
45
46