--Boundary-00=_z1n39MY9bBOi20u
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Since everyone seems to have their own scripts for generating galleries,
here's mine! <smile/> icon call igal. Results look like:
http://goatee.net/photo/web/2002/10/
--Boundary-00=_z1n39MY9bBOi20u
Content-Type: application/x-shellscript;
name="icon"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="icon"
#!/bin/bash
if [ ! -d ./images ]; then mkdir ./images; fi;
if [ ! -d ./images/thumbs ]; then mkdir ./images/thumbs; fi;
for f in *.jpg;
do
convert -geometry "600x600>" -quality 60 -border 4x6 -bordercolor black \
-comment "%c Copyright 2001
http://goatee.net/" -antialias -pointsize 12\
-font 'helvetica' \
-fill '#999999' -gravity SouthEast \
-draw 'text 10,10 "� 2002
http://goatee.net/"' \
$f ./images/$f
convert -geometry "150x120" $f ./images/thumbs/$f;
done
if [ -f .htaccess ]; then
cp .htaccess images/;
echo -e "<Files "*.jpg">\nAllow from all\n</Files>" > images/thumbs/.htaccess
fi;
webdir=`pwd | sed -e 's/hires/web/' -e s/images//`
rm -rf $webdir
if [ ! -d $webdir ]; then mkdir $webdir; fi;
cd images; igal > index.html;
cp -r * $webdir
cd ..; rm -rf images
--Boundary-00=_z1n39MY9bBOi20u
Content-Type: application/x-perl;
name="igal"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="igal"
#!/usr/bin/perl -w
use strict;
my ($pwd); chop($pwd = `pwd`);
&printHeader;
&printMetadata;
opendir(DIR, $pwd) || die "\nCould not open $pwd\n";
my @files = readdir(DIR);
my $file = "";
@files = sort @files;
foreach $file (@files)
{
if ($file =~ /jpg$/)
{
&printFileName($file);
}
}
closedir (DIR);
&printFooter;
#print the name of the file in hrefs
sub printFileName
{
my $file = $_[0];
#print "file = $foo ";
print <<EOF;
<a href="$file"><img alt="$file" src="thumbs/$file"/></a>
EOF
}
#print html included in the metadata file
sub printMetadata
{
if (open(META_FILE, "meta.txt")) {
my @array = <META_FILE>;
close(META_FILE);
foreach (@array) {
print();
}
}
}
#print the top of the html file
sub printHeader
{
$_=$pwd;
my ($rewriteURL) = m|/e/photo/web(.*$)|;
print <<EOF;
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css"
href="
http://goatee.net/photo/2001.css"/>
<title>Gallery for $rewriteURL</title>
</head>
<body>
<h1>goatee.net Archive Gallery</h1>
<h2>$rewriteURL</h2>
<div align="center">
EOF
}
#print the bottom of the html file
sub printFooter
{
print <<EOF;
<p></p>
<tt>copyright © 1998-2002 Joseph M. Reagle Jr.
<a href="mailto:geek\@goatee.net">geek\@goatee.net</a></tt>
</div>
</body>
</html>
EOF
}
exit;
--Boundary-00=_z1n39MY9bBOi20u--