[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] Creating an index page



james wrote:

> I modifying a script which makes an index page to show
> whats in that directory.
> At the moment it only shows .html documents, I want it to
> show gifs and jpgs and create a link to each one in the html...

Well, I've got a cute little script that I wrote a while
back... it's not pretty, but it works. What it does is
creates a graphical index of all of the jpgs and gifs in
a directory. It reads the image size from each file and
scales a miniature copy of the image into a table cell with
the right aspect ratio. Each smaller image is a link to the
larger image. It's a snap to use; I saved it as a droplet
and just drop a copy into whatever directory I want to index,
double-click and there you go. I've got three different
flavors, one for basic images (multiple columns), one for
horizontal rules (one column), and one for backgrounds
(which prints text in various colors to see the contrast).
I didn't share it previously because it could use a bit
of cleanup and I was planning on adding a configuration
dialog to simplify things... and a feature to fix one
problem. For very large image directories it creates a
large HTML file and it can take a while for the images to
all get loaded. I was thinking about adding a page limit
and splitting really large documents up into multiple pages
with automagic links forward and backward...

Anyway, I'd be happy to share what I've got, if that's what
you're looking for. Only one problem... it's at home right
now, so it will have to be tomorrow before I can post it.

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org