================================================================================ UCW::Gallery v2.1 (c) 2004--2015 Martin Mares ================================================================================ This is a simple photo gallery for my web pages, or rather a set of bricks from which you can create one. License ~~~~~~~ UCW::Gallery and the accompanying scripts can be freely used and distributed according to the terms of the GNU GPL v2 or newer. The images in nrt-blue/, used by the NrtBlue theme, are derived from images in an ancient version of the cthumb package, which is (c) Carlos Puchol and which can be distributed under GNU GPL v2. See http://cthumb.sourceforge.net/ for the current version of cthumb. The JavaScript files and related data in highslide/, used by the HighSlide theme, come from the Highslide JS media viewer, which is (c) Highsoft AS. It can be freely used on personal and non-profit websites. For commercial or government use, a paid license is required. See http://www.highslide.com/ for details. Requirements ~~~~~~~~~~~~ Perl with the following non-core modules: o UCW::CGI (see http://www.ucw.cz/libucw/) o Image::Magick o Image::Exif o Archive::Zip o Digest::SHA o common::sense Files and directories ~~~~~~~~~~~~~~~~~~~~~ o gal -- a front-end script for maintenance of galleries. All other programs are run as sub-commands of this script. Try "gal --help". o gallery.cf -- all programs expect that the current directory contains a configuration file. In fact, the config file is a perl script, whose sole purpose is to set up paths, construct a gallery object and set its options. A simple example looks as follows: use UCW::Gallery; my $gal = UCW::Gallery->new; $gal->set(Title => 'A Gallery', SubTitle => '(an example)'); return $gal; o gallery.list -- a list of original photos together with per-photo parameters. Usually created by "gal scan", then tweaked manually. See `FORMATS' for description of file syntax. o gallery.cache -- used internally by "gal scan" to store cached image hashes. o Originals directory -- original images, from which the gallery is generated. o Photo directory -- keeps processed (usually down-scaled) versions of the original images. These are the images shown to the user. o Cache directory -- keeps various cached data, like thumbnails of all photos. o gallery.cgi -- interfaces the gallery to your web server. E.g.: #!/usr/bin/perl use lib "../path/to/gallery/modules"; use UCW::Gallery; use UCW::Gallery::Web::Plain; my $gal = UCW::Gallery->load_config(); UCW::Gallery::Web::Plain->run($gal); Workflow ~~~~~~~~ o vi gallery.cf o gal scan /path/to/originals -- this creates gallery.list, populates it with descriptions of all photos and reads rotation from EXIF tags. o vi gallery.list -- edit image descriptions and other options. o gal gen -- generate photos from the originals (after this, the originals are no longer needed). o gal cache -- generate cached data. o Later, the gallery can be updated: - When you edit image descriptions, re-run "gal cache". - When you edit image options (rotation etc.), re-run "gal gen". - When you want to add new images, re-run "gal scan". Give it the new list of images and it will try to re-use as much information from the previous gallery.list as possible. - When you modify existing images, run "gal scan --update". o See example/* for an example web front-end. Various notes ~~~~~~~~~~~~~ o When you want to re-generate all galleries at once, you can use "gal --all -p4 gen". This will run "gal gen" on all subdirectories containing "gallery.cf", 4 of them in parallel. o See bin/gal-mj-* for various hacks I wrote for myself.