mkgallery.sh

I wrote this bash script to have a small and easy to use tool for generating a simple gallery out of a bunch of JPG files in a directory.

So basically you just have to put your images into a folder on your server and log in via ssh. While you're in the folder, start "mkgallery.sh -n" which will generate a new template file. You can now edit this template file (usually it will be called "mkgallery-template.txt") with any text editor and adjust some settings, as well as add a description / comment to each image. When you're done, save the template file and run "mkgallery.sh -c". Your gallery is finished.

The script resizes the images to thumbnail size and generates a HTML file. It also takes the descriptions / comments and puts them right below the thumbnails. Additionally it fetches the EXIF information from each image and shows that, too.

I added an option to be able to use Lightbox, which adds some fancy effects to the gallery. If you want to use Lightbox, you have to enable "FANCY JSCRIPT" in the template file.

Download mkgallery.sh