gtindex.pl 1.2 - Graphics and Thumbnail indexer.
source - http://www.bewley.net/perl/gtindex.pl
gtindex.pl [ -b bullet url ] [ -d ] [ -f baseref ] [ -h ] [ -l line url ] [ -m directory ] [ -r num rows ] [ -s ] [ -t page title ] [ -v ]
Examples:
gtindex.pl *.jpg
gtindex.pl -vdt "Dale's Police Brutality Imagery" -b "none" *.gif
gtindex.pl -v -l "none" -r 3 -t "graphics" *.gif *.jpg
In case you are confused... This is a command line program only, not a CGI
app, for now.
This script requires perl5 (barely) and has been testing in win95 and UNIX.
Well, it hasn't been tested on win95 lately. good luck.
Use this if you have many many graphics that you would like to be able to
browse easily with a web browser.
Say you have a dir called gfx filled full of graphics. Create a subdir
called gfx/thumbnails and place thumbnail sized copies of each graphic in
there. How do you make the thumbnails? That depends on your platform. I
would reccomend
thumbsplus for win95 and convert for UNIX. Convert is a part of the Imagemagik package. Now cd to your gfx
dir and run this little gem.
Thumbnails must be in a subdir of the dir containing your pictures. They
must also have the SAME NAME as their full sized versions!! Of course you
don't need thumbnails at all if you don't have any. Just don't create the
thumbnail dir and gtindex.pl will still work normally. Well, almost...
- Dale's Images
-
http://www.bewley.net/photos/tindex.html
- Jeremy Stafford-Deitsch's Shark Photos
-
http://www.wattcom.com/sharks/photo/tindex.html
- Marisa Tomei Pictures
-
http://espsun.space.swri.edu/~joey/pics/marisa/tindex.html
- -b URL
-
Bullet graphic URL. To appear to the left of image titles. Use -b ``none''
if you prefer no bullets.
- -d
-
Destructive. Overwrite old indexes.
- -f URL
-
Baseref. URL to prepend all IMG SRC's.
- -h
-
Help!
- -l URL
-
Line graphic. To appear at the at top and bottom of indexes. Use -l
``none'' if you prefer no line graphics.
- -m dir
-
Directory (relative to current dir) which contains thumbnail images.
- -r number
-
Maximum rows or images in table cell.
- -s
-
Print size of file in index.
- -t "page title"
-
Title of page. Don't forget the quotes!
- -v
-
Verbose.
You may modify these variables to your heart's content.
- $ALINK = "#ee0033";
-
Index active link color.
- $BGCOLOR = "#ffffff";
-
Index background color.
- $LINK = "#6600ff";
-
Index link color.
- $TEXT = "#000000";
-
Index normal text color.
- $VLINK = "#ee0000";
-
Index visited link color.
- $BULLET = "../images/ball.gif";
-
Default bullet next to index entry. ``'' if none.
- $MAX_ON_PAGE = "12";
-
Maximum images on a page. i won't explain this because it is part of the
hard coding and may just confuse things.
- $MAX_ROWS = "4";
-
Maximum number of images down a column. this means you will have
$MAX_ON_PAGE / $MAX_ROWS columns (3)
- $SITE_NAME = "Dale's Image Gallery - ";
-
Printed in title. Change this before you run it.
- $HOME_URL = "http://www.bewley.net/perl/";
-
Home link on indexes. Change this too.
- $THUMB_DIR = "thumbnails";
-
Directory containing optional thumbnails of images. it is assumed this will
be within the current directory and thumbnails will have same names as full
sized versions.
- $TITLE = "";
-
Default title on each index page.
- Make more portable.
-
The format of the index is not very flexible right now. I'm sure it will be
eventually. I'd like to use the template process I use on http://www.bewley.net/perl/gif2html.html
- Add recursion?
-
Support subdirectories of images. Sometime..
- use Image::Size
-
Instead of the subs within use this module for getting thubmnail
dimensions.
- make CGIable.
-
Shouldn't be much I just don't have time.
- make less ugly!!
-
Dale Bewley, Bewley Internet Solutions Inc, mailto:sales@bewley.net
Bewley Internet Solutions perl page