1
0
Fork
You've already forked simgal
0
Simple static web photo gallery generator
  • Shell 89.6%
  • CSS 6.5%
  • Makefile 3.9%
Michael Cardell Widerkrantz e258bd1f70 Remove the help - document accesskeys elsewhere
- help.html not linked from anywhere. Let's remove it.
- Accesskeys are documented in README instead.
2025年01月09日 17:18:49 +01:00
gallery.css Include stylesheet 2025年01月09日 17:15:12 +01:00
LICENSE Added 2014. 2014年02月19日 18:16:23 +01:00
Makefile New release. 2014年02月19日 18:19:35 +01:00
NEWS Added news. 2014年02月19日 18:17:10 +01:00
README.md Remove the help - document accesskeys elsewhere 2025年01月09日 17:18:49 +01:00
simgal Include stylesheet 2025年01月09日 17:15:12 +01:00

simgal - a small photo album generator

This is a small shell script to generate a static HTML(5!) photo album with thumbnails and preview images given a directory of JPEG images.

To use, just cd to your photo directory and run the script. Then go fetch some coffee. If you have a lot of images, it will take a long time to run the first time. If you add images later and rerun the program it should be much quicker.

NOTE! The JPEG images will be rotated in place if there are EXIF headers saying that they should be. The rotation is lossless and modification time of the files will be preserved.

Theme and customization

I include a CSS style file, gallery.css. Place that on your web server and modify the stylesheet variable in the simgal script to the URL.

Prerequisites

  • sh. The script was born as a Bourne script, got changed to zsh when I needed arrays for the previous and next links and was then rewritten as a pure Bourne shell script again in an inspired evening.

  • ls. Currently does the sorting of the files. See at the top of the script simgal. Change it to what you want.

  • FreeBSD's stat(1). There might be a stat(1) in your Unix, too, but it might use some other options to get the same result. Check the manual page!

  • convert from ImageMagick:

    http://www.imagemagick.org/

  • jhead

    http://www.sentex.net/~mwandel/jhead/

    Used to get EXIF data and JPEG comments (COM blocks) from the images. If you want to add comments to a picture, which will be displayed in the HTML files, you can use jhead -ce or wrjpgcom.

  • jpegtran

    Called from jhead to rotate images. Included with libjpeg in most cases but can be found here:

    http://jpegclub.org/

    Yes I know about the -scale options but some viewers, for instance my Firefox, wouldn't show a scaled JPEG file so I stick with convert for now.

Access keys

The generated gallery uses these accesskeys in the preview page:

  • U goes up to the album index.
  • P goes to the previous image in the album.
  • N goes to next image in the album.
  • Z goes to the full size of the image (zoom).

How you actually trigger them is very much up to the browser, however.