#!/bin/bash

#!/login
#!/register

Bash Image Gallery


The Bash Image gallery is a web based image gallery with a minimalistic layout and is written in bash and using imagemagick’s convert program to create thumbnails and scaled images.
It’s lightweight and low on features:
- caching of thumbnails and scaled images
- short comments for each image

Installation


The tarball contains these files:
 
cgi-bin/thumbs.sh 
cgi-bin/navigation.sh 
cgi-bin/view.sh 
cgi-bin/config 
copy.htm 
index.htm 

Put them into a directory which your webserver can see, let’s say /home/www/images.
Then - if you are using the Apache http server - add these lines to your httpd.conf where appropriate:
 
ScriptAlias /images/cgi-bin /home/www/images/cgi-bin 
Alias /images /home/www/images 

Then edit the file /home/www/images/cgi-bin/config and fix the paths in there.
You should also edit the file "copy.html" to hold the copyright/license for your pictures.

Publishing images


To publish images copy them into a subdirectory into /home/www/images. The directory must be named like this: YYYY-MM-DD_desc
Where YYYY is the year in 4-digit notation, MM the month in 2-digit notation and DD the day in 2-digit notation. This information will be used for sorting the image directories.
Your webserver must have ’’’write access’’’ to this directory because it will create subdirectories named thumbs (where the thumbnails are stored) and size (where the scaled images will be stored). You can remove these directories at any time (for example, using a cronjob), they will be recreated the next time someone views the images.

Optional comments


You can optionally display comments below each image.
To do so, create a file called comments in the directory the images are stored in and add lines like this:
 
01.jpg This is me 
10.jpg This is my beloved girlfriend 
11.jpg This is my mother 

and so on.

Edit | History | Subscribe