CreateIndex

An arexx script to create HTML picture index using ImageStudio

Release v4.1

Contents



What does it do?

Anyone with more than a handful of pictures with know that even with the most verbose filenames it can still be hard to track down the particular image which you seek. So people have written various proggys to catalogue your pics. The simplest of these being those that create thumbnails (small versions) of your pics and generate a HTML file to allow them to be viewed in favouite browser. You've guessed it this is what CreateIndex does!

Example


How do you use it?

Installation

Copy the files from the Rexx directory to your ImageStufio/Rexx directory. Stick this file where you like it. That's all.

Usage

Initially : Open the scripts window in ImageStudio and double click on CreateIndex. Shift select all files you want to be in index or just hit 'All'. Wait with baited breath. A file called index.html will be generated in the directory as well as the thumbnails. If you have selected more than row*columns images (default 10*5=50) additional files called index2.html etc. will be created.

Updating : If you have added more files to a directory simply repeat the previous process the file pattern will be set not to show the index files (other html files will appear) or any thumbnails.

Advanced : All the parameters are constants defined in the script itself this means if you want to change things you will need to edit the script yourself Shreaks of horror!!!. Don't worry its dead easily if you can type and breathe (preferably at the same time). All the values that you may wish to change are near the top of the script:


/* PROGRAM CONSTANTS - change these values to suit */

HTMLFile='Index'           /* What to call the html file, Oh Yes */
SquareSize=100             /* Size of square into which to fit pic */
TNFormat='PNG'             /* Thumbnail file format */
TNArgs='INTERLACE=ADAM7'   /* Thumbnail file format arguments */
TNExten='png'              /* Thumbnail file extension */
TNPrefix='TN/TN'           /* Thumbnail prefix */
Title=1                    /* If 1 add title and heading */ 
TitlePattern='%D Page %I'  /* Pattern for page title and heading */
                           /* %P(athname) %D(irectory) %F(ilename) %I(ndex)*/
Labels=0                   /* If 1 add picture label to html */
LabelPattern='%N (%Wx%H) %SKb' /* pattern for labels %N(ame) %W(idth) */
                           /*  %H(eight) %S(ize in Kb) */
TableColumns=5             /* No. of pics per row */
TableRows=10               /* No. of rows in table in each index file */
TableBorder=1              /* Size of table borders, in pixels */
PrevText="Prev"            /* Text for Previous and Next buttons */
NextText="Next"            /* say it in your language! */

I suggest rather than changing the parameters in the script each time. You copy the script to a different name and set the parameters in that for latter use eg CreateIndex_Local, CreateIndex_Web.

The format string values need a little more explanation. For the TitlePattern if you point the script at a Work:Pictures/Family then:


%P is Work:Pictures/Family
%D is Family

In the label format string please note that if you specify %W and/or %H then the script will load the original image if it hasn't already to obtain the images width and height. This means it will take a while longer to update an index.

Extra Scripts


To do

All done! (Hopefully)


History



Who wrote this?

James S Perrin james.perrin@ntlworld.com

This archive is freely distributable as long as the archive remains unchanged. Copyright remains with the author. I'd appreciate an email if anyone likes it.

A big thanks to Mike Styron for all his help and suggestions putting this lastest version together!