Photo gallery software
sigal
sigal appears to be the most current static gallery generator and is also fairly easy to use:
sigal init sigal build -c sigal.conf.py pictures gallery
Now the gallery
directory can be served by a webserver, or even by sigal
itself:
$ sigal serve gallery/ DESTINATION : gallery/ * Running on http://127.0.0.1:8000/
igal2
Basic usage:
igal2 -d . -a -k -r --www --dest assets/
This will process pictures in the current directory, with the following options:
-d <dir> operate on files in directory <dir> (.) -a write image sizes under thumbnails on index page -k use the image captions for the HTML slide titles -r omit the film reel effect altogether --www make all iGal files world-readable --dest Destination directory for the helper files
There's no easy way to specify a gallery title or to change the sort order of the gallery.
llgal
llgal is based on igal but has some additional features. The last release is from 2011[1] but its SVN repository[2] has some recent activity.
Basic usage:
llgal --www --sort revtime --ct %Y-%m-%d -a -d . -k --title "Pictures of Foo"
This will process pictures in the current directory, with the following options:
--www make all llgal files world-readable --sort revtime sort pictures in reverse-mtime (oldest pictures on top) --ct %Y-%m-%d use image timestamps as captions, YYYY-mm-dd -a write image sizes under thumbnails on index page -d operate in directory <dir> (current directory) -k use the image captions for the HTML slide titles --title title of the index of the gallery
llgal can be customized[3] quite a bit.
Captions
Generate captions:
$ llgal --gc Listing entries in . : 100.00% Found 147 entries in current directory Creating the captions file: 100.00% Now edit the .llgal/captions file to your liking and run llgal!
Edit captions:
$ vi .llgal/captions [...] IMG: DSCN1610.JPG ---- This is a picture of foo IMG: DSCN1611.JPG ---- Here you can see some bar
...and then run llgal again.
Next slide
Go to the next slide by clicking the current slide picture by changing ~/.llgal/slidetemplate.html like this:
Replace
<!--THIS-SLIDE-->
with
<a href="<!--NEXT-SLIDE-->"><!--THIS-SLIDE--></a>
...and run llgal again:
$ llgal --www --sort revtime --ct %Y-%m-%d -a -d . -k --title "Pictures of Foo"
Reading entries in the captions file: 100.00%
Preparing entries: 100.00%
Found 147 entries in the captions file.
Using '/home/bob/.llgal/slidetemplate.html' as HTML slide template.
Creating individual slides: 100.00%
Using '/usr/share/llgal/indextemplate.html' as HTML index template.
Creating the index.html file: 100.00%
Found llgal.css in .llgal/, using it.
Making all llgal files world-readable for WWW publishing.
Piwigo
Installation
To install Piwigo from SVN:
svn checkout http://piwigo.org/svn svn switch http://piwigo.org/svn/tags/2.6.2 # Switch to a stable version svn export --force . ~/htdocs/piwigo/
Create a few prerequisites:
mkdir -p -m0770 _data upload chmod 0770 _data local{,/config} themes sudo chgrp www-data _data themes upload
After creating a database, create the database structure:
mysql -D piwigo -u piwigo -p < install/piwigo_structure-mysql.sql mysql -D piwigo -u piwigo -p < install/config.sql
Open the Piwigo URL to start the installation routine:
https://example.org/piwigo/install.php
Upgrade
svn switch http://piwigo.org/svn/tags/2.6.3 # Switch to the new version svn export --force . ~/htdocs/piwigo/
Point the browser to the upgrade routine:
http://example.org/photos/upgrade.php
Zenphoto
Installation
Checkout Zenphoto from HEAD:
git clone git://github.com/zenphoto/zenphoto.git zenphoto-git
Export a branch to document root:
cd zenphoto-git
git archive --format=tar --prefix=zenphoto/ origin/1.4.5 | tar -C ~/htdocs -xf -
Remove clutter, adjust permissions:
cd ~/htdocs/zenphoto
rm -rf CHANGELOG.md README.md doc_files/
mkdir cache_html
chmod 0770 albums cache cache_html plugins uploaded zp-data
sudo chgrp www-data albums cache cache_html plugins uploaded zp-data
touch {albums,cache,cache_html,themes,uploaded,zp-data}/index.html # Prevent directory listing
With that in place, we have to configure zp-data/zenphoto.cfg:
$ grep ^.conf zp-data/zenphoto.cfg
$conf['db_software'] = 'MySQL';
$conf['mysql_user'] = 'foo';
$conf['mysql_pass'] = 's3cr3t';
$conf['mysql_host'] = '127.0.0.1';
$conf['mysql_database'] = 'bar';
$conf['mysql_prefix'] = 'zp_';
$conf['UTF-8'] = true;
$conf['album_folder'] = '/albums/';
$conf['album_folder_class'] = 'std';
$conf['upload_tmp_dir'] = '/www/htdocs/zenphoto/uploaded/tmp';
$conf['server_protocol'] = "https";
$conf['FILESYSTEM_CHARSET'] = 'UTF-8';
Be sure to restrict access to logfiles that may be generated in zp-data/:
sudo chmod 0240 zp-data/*.log
sudo chown www-data:bob zp-data/*.log
After that, try to access https://example.com/zenphoto/zp-core/setup.php. Once this is done, the setup directory can be locked:
chmod 0000 zp-core/setup*
Upgrade
cd zenphoto-git
git archive --format=tar --prefix=zenphoto/ origin/1.4.6 | tar -C ~/htdocs -xf -
Unlock setup files:
chmod 0555 zp-core/setup chmod 0444 zp-core/setup.php
Go to https://example.com/zenphoto/zp-core/setup.php and follow the instructions. The database user must have sufficient privileges to ALTER the structure of the database.
Be sure to lock the setup files afterwards:
chmod 0000 zp-core/setup*
Links
- Comparison of photo gallery software
- Static image gallery generator comparison
- Sourceforge: Image Galleries Software
- PhotoShow