NAME
App::Followme::CreateGallery - Create a photo gallery page
SYNOPSIS
use App::Followme::CreateGallery;
my $gallery = App::Followme::CreateGallery->new($configuration);
$gallery->run($directory);
DESCRIPTION
This package builds an index for a directory which serves as a photo gallery. The variables described below are substituted into a template to produce the gallery. Loop comments that look like
<!-- loop -->
<!-- endloop -->
indicate the section of the template that is repeated for each photo contained in the directory. The following variables may be used in the template:
- absolute_photo_url
-
The absolute url of the photo
- absolute_thumb_url
-
The absolute url of the photo thumbnail
- photo_height
-
The height of the photo
- photo_url
-
The relative url of the photo
- photo_width
-
The width of the photo
- thumb_height
-
The height of the photo thumbnail
- thumb_url
-
The relative url of the photo thumbnail
- thumb_width
-
The width of the photo thumbnail
- title
-
The photo tile, derived from the photo filename.
- time fields
-
The variables calculated from the modification time are:
weekday, month,
monthnum, day, year, hour24, hour, ampm, minute,
andsecond.
CONFIGURATION
The following fields in the configuration file are used:
- gallery_file
-
The name of the file containing the photo gallery. By default, this name is index.html.
- gallery_include
-
A wild card expression indicating the files that are photos to be included in the gallery. The default is '*.jpg',
- gallery_template
-
The name of the template used to produce the photo gallery. The default is 'gallery.htm'.
- thumb_suffix
-
The suffix added to the photo name to produce the thumb photo name. The default is '-thumb'.
- thumb_width
-
The width of the thumb photos. Leave at 0 if the width is defined to be proportional to the height.
- thumb_height
-
The height of the thumb photos. Leave at 0 if the height is defined to be proportional to the width. If both thumb_width and thumb_height are 0, no thumb photo will be created.
- photo_width
-
The width of the photo after resizing. Leave at 0 if the width is defined to be proportional to the height.
- photo_height
-
The height of the photo after resizing. Leave at 0 if the height is defined to be proportional to the width. If both photo_width and photo_height are zero, the image will not be resized.
LICENSE
Copyright (C) Bernie Simon.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Bernie Simon <bernie.simon@gmail.com>