Minimally Sufficient Gallery

Description

The Minimally Sufficient Gallery (MSG) is a small perl script that generates thumbnails and XHTML documents to serve as a gallery for a directory of JPG, GIF, and PNG formatted images. The primary considerations in designing the MSG were:

A demo gallery is available at http://wubi.org/code/msg/example/.

Requirements

The MSG script was written to run on *nix variants. It has been tested on Linux and NetBSD. In addition, it requires the following:

Usage

Installation

Remember to:

The script has some configuration variables near the top. They are named in CAPITAL_LETTERS.

There are two ways to use the MSG:

Command Line

Install the script in ~/bin/ and rename it to msg. To generate a gallery in the images directory:

cd images/
msg

When you add new images to the directory, simply run the script in the images directory again. It will detect the new images and generate thumbnails for them. If you want to regenerate a single thumbnail, simply delete the thumbnail from the data directory created by the script and run the script again.

To force the regeneration of all thumbnails after, say, adjusting settings in the script, run the script with the --regen option:

cd images/
msg --regen

To force a total recreation of the gallery, delete the data directory and run the script.

WWW

Install the script in the directory containing the images, and point your web browser to the script. For example, if the images are in ~/public_html/images/ and your homepage is http://example.com/, navigate to the following URL:

http://example.com/images/msg.cgi

When you add new images to the directory, access the same URL again. The script will detect the new images and generate thumbnails for them. If you want to regenerate a single thumbnail, simply delete the thumbnail from the thumbnail directory created by the script and access the script's URL once more.

To force the regeneration of all thumbnails and XHTML documents after, say, adjusting settings in the script, add the regen option to the url:

http://example.com/dir/msg.cgi?regen=1

To force a total recreation of the gallery, delete the data directory and run the script.

Upgrade

To upgrade MSG, download the latest version from http://wubi.org/code/msg/ and replace only the script (msg.cgi) with the new version. If you do not delete the data directory, all your settings will be maintained across the upgrade.

Uninstall

To remove a gallery and keep the original images, delete the script, index file, and the data directory (by default, msg_data). For example, on the command line:

rm -rf msg.cgi index.html msg_data/

Download

The MSG script and any related documents are available in the source directory.

Future

This is a list of features under consideration for the MSG, from most to least likely to appear anytime soon:

Your suggestions are also appreciated.

Credits

MSG was written by me, Micah Sittig / micah@earthling.net. It is under no sort of license. If you choose to use it, please drop me an e-mail.