Degal

About

Degal is a HTML photo gallery script written in Python.

History

Degal was originally based on a similar HTML gallery script called EGAL, written by Santtu Pajukanta, rewritten to add more features such as support for sub-folders (!).

Releases 0.1 - 0.2 remained fairly simplistic single-module scripts which were manageable, but development in the old SVN repository quickly split the code up into a package. At this point the packaging and structure quickly fell apart, with the resulting code and CGI scripts being barely useable by myself.

In early summer 2009, I picked up development again, heavily refactoring the old svn code into a (hopefully) better structure.

Currently, the only releases are still from the old first-generation era, but hopefully we should be seeing a third-generation release fairly soon :)

Features

  • Generate static per-folder/img .html files for a directory tree
  • Generate thumbnail and preview versions of each image

Download

Release versions

Development version

hg clone http://hg.qmsk.net/degal

Installation and usage (for release versions)

Extract the archive file and move these files and directories to where your images are:

  • .htaccess
  • degal.py
  • utils.py
  • shorturl.cgi
  • style.css
  • templates/

If you wish to use ShortURLs and run DeGAL with mod_userdir, you may need to modify the .htaccess to set the RewriteBase.

If you now execute degal.py on the command line, it will scan through your images, create thumbnails, preview images, as well as generate the HTML gallery pages.

Gallery (directory) titles may optionaly be specified in a file called title.txt in each directory. If present, it should contain a short title that will be used for all links to that gallery. You may also add a longer description (after the title, seperated by three dashes, ---, extra whitespace will be stripped away) which will be shown on the directory's index page.

The same may be done for induvidual images (replace the file extension with .txt, i.e. DSC0001.jpg becomes DSC0001.txt) whereupon the URL for the image will use a simplified version of the image's title.

It is also possible to specify a list of directories/files to index as command-line arguments to degal.py, in which case it will only process those files. Note that a directory index will only be updated if the directory itself is included in the filter.

Requirements

Release version / Development core

Development optional

Changelog

  • 0.2
    • Added ShortURL feature
    • Added ability to specify a list of files to update on the command line

Links

Source Repository

Mercurial: http://hg.qmsk.net/degal

Example Gallery

http://photos.qmsk.net/