Sigal is yet another simple static gallery generator. It’s written in Python and it allows to build a static gallery of images with the following features:
The idea behind Sigal is to ease the use of the javascript librairies like galleria. These librairies do a great job to display the images, Sigal does what is missing: resize images, create thumbnails, generate html pages.
Sigal is currently compatible only with python 2.
Links :
Sigal comes with two themes, based on the colorbox and galleria Javascript libraries:
Install the extension with one of the following commands:
$ easy_install sigal
or alternatively if you have pip installed:
$ pip install sigal
$ sigal build [-h] [-d] [-v] [-f] [-c CONFIG] [-t THEME]
[source] [destination]
Required arguments:
Optional arguments:
The configuration must be set in a sigal.conf.py file in the current directory. It can also be specified with the -c flag. An example file with explanations on the settings is available in sigal/templates/sigal.conf.py and is shown below. This file is copied to the current directory with the sigal init commmand.
# -*- coding: utf-8 -*-
#
# All configuration values have a default; values that are commented out serve
# to show the default. Default values are specified when modified in this
# example config file
# Source directory. Can be set here or as the first argument of the `sigal
# build` command
source = 'pictures'
# Destination directory. Can be set here or as the second argument of the
# `sigal build` command (default: '_build')
# destination = '_build'
# Theme :
# - colorbox (default), galleria, or the path to a custom theme directory
theme = 'galleria'
# Size of resized image
img_size = (800, 600)
# Pilkit processor used to resize the image
# (see http://pilkit.readthedocs.org/en/latest/#processors)
# - ResizeToFit: fit the image within the specified dimensions (default)
# - ResizeToFill: crop THE IMAGE it to the exact specified width and height
# - SmartResize: identical to ResizeToFill, but uses entropy to crop the image
# img_processor = 'ResizeToFit'
# Generate thumbnails
# make_thumbs = True
# Subdirectory of the thumbnails
# thumb_dir = 'thumbnails'
# Prefix and/or suffix for thumbnail filenames (default: '')
# thumb_prefix = ''
# thumb_suffix = '.tn'
# Thumbnail size (default: (200, 150))
# For the galleria theme, use 280 px for the width
# For the colorbox theme, use 200 px for the width
thumb_size = (280, 210)
# Crop the image to fill the box
# thumb_fit = True
# Keep original image (default: False)
# keep_orig = True
# Subdirectory for original images
# orig_dir = 'original'
# Jpeg options
# jpg_options = {'quality': 85,
# 'optimize': True,
# 'progressive': True}
# Write HTML files. If False, sigal will only process the images.
# write_html = True
# Add index.html to the URLs
# index_in_url = False
# A list of links (tuples (title, URL))
# links = [('Example link', 'http://example.org'),
# ('Another link', 'http://example.org')]
# Add a copyright text on the image (default: '')
# copyright = "An example copyright message"
# Google Analytics tracking code (UA-xxxx-x)
# google_analytics = ''
Information on an album can be given in a file using the markdown syntax, named index.md :
Title: Another example gallery
Thumbnail: test2.jpg
And a description with *Markdown* syntax.
Some meta-data keys are used by Sigal to get the useful informations on the gallery:
Any additional meta-data is available in the templates. For instance:
Authors: Waylan Limberg
John Doe
can be used in the template with:
{% if 'authors' in meta %}
<p>Authors: {{ meta.authors|join(', ') }}</>
{% endif %}
If this file does not exist or if some meta-data is missing:
Released on 2013-06-12.
Released on 2013-03-14.
Released on 2013-03-11.
Released on 2013-03-04.
Released on 2012-12-20.