rendered paste body#!/usr/bin/perl
# Determine the basename of this directory:
$ThisDir=`pwd`;
chomp($ThisDir) ;
@DirParts = split("/",$ThisDir) ;
$ThisDirsBaseName = pop(@DirParts) ;
# Make way for the new index:
if ( -f "table" )
{
system("rm -f old-table") ;
system("mv table old-table") ;
} ;
open(OUT,">table") || die("Out:table") ;
print(OUT "<table BORDER COLS=2 WIDTH=\"100%\">\n") ;
foreach $Topic ( `cat .topics` )
{
chomp($Topic) ;
print(OUT "<tr>\n") ;
print(OUT "<td width=\"25%\">\n") ;
@FileNameList = <$Topic*.jpg> ;
# for multi-image in "$imagename*.jpg"
foreach $FileName ( sort @FileNameList )
{
chomp($FileName) ;
# echo (link tn_$multi-image.jpg to $multi-image.jpg)
print(OUT "<br><A HREF=\"" . $FileName . "\"><IMG SRC=\"tn_" .
$FileName . "\"></A>\n") ;
# echo (Create a link to the big image)
# print(OUT "<br><a href=\"b_" . $FileName . "\">Larger image is here</a>\n") ;
} ;
# </td><td>
print(OUT "</td>\n") ;
print(OUT "<td>\n") ;
open(DESC,"<" . $Topic . ".txt") || die("In:" . $Topic . ".txt") ;
while ( $aTopicDescriptionLine = <DESC> )
{
# (insert description here from the # hashfile)
print(OUT $aTopicDescriptionLine) ;
} ;
close(DESC) ;
# </td></tr>
print(OUT "</td>\n") ;
print(OUT "</tr>\n") ;
} ;
print(OUT "</table>\n") ;
close(OUT) ;