terom@53: <% terom@53: terom@53: import os terom@53: terom@53: RELEASE_PATH = "/home/projects/degal/releases" terom@53: RELEASE_URL = "http://projects.qmsk.net/degal/releases" terom@53: terom@53: # load release links terom@53: releases = [] terom@53: terom@53: for filename in os.listdir(RELEASE_PATH) : terom@53: if filename.startswith('.') : terom@53: continue terom@53: terom@53: path = os.path.join(RELEASE_PATH, filename) terom@53: url = "%s/%s" % (RELEASE_URL, filename) terom@53: terom@53: releases.append((filename, url)) terom@53: terom@53: releases.sort() terom@53: terom@53: %> terom@53: terom@53:
terom@53: Degal is a HTML photo gallery script written in Python. terom@53:
terom@53: terom@53:terom@55: Degal was originally based on a similar HTML gallery script called EGAL, terom@53: written by Santtu Pajukanta, rewritten to add more features such as support for sub-folders (!). terom@53:
terom@53: terom@53:terom@53: Releases 0.1 - 0.2 remained fairly simplistic single-module scripts which were manageable, but development terom@53: in the old SVN repository quickly split the code up into a package. At this point the packaging and terom@53: structure quickly fell apart, with the resulting code and CGI scripts being barely useable by myself. terom@53:
terom@53: terom@53:terom@53: In early summer 2009, I picked up development again, heavily refactoring the old svn code into a (hopefully) terom@53: better structure. terom@53:
terom@53: terom@53:terom@53: Currently, the only releases are still from the old first-generation era, but hopefully we should be seeing a terom@53: third-generation release fairly soon :) terom@53:
terom@53: terom@53:hg clone http://hg.qmsk.net/degal
terom@53:
terom@53: Extract the archive file and move these files and directories to where your images are:
terom@53:If you wish to use ShortURLs and run DeGAL with mod_userdir, you may need to modify the .htaccess to set the RewriteBase.
terom@53: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.
terom@53: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.
terom@53: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.
terom@53: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.
terom@53: terom@53: terom@53:terom@53: Mercurial: http://hg.qmsk.net/degal terom@53:
terom@53: terom@53:terom@53: http://photos.qmsk.net/ terom@53: