LAZYGAL(1) | User commands | LAZYGAL(1) |
NAME¶
lazygal - static web gallery generatorSYNOPSIS¶
lazygal [-h | -v | [options] albumdir]
DESCRIPTION¶
This manual page explains the lazygal program. This program is a static web gallery generator written in Python.lazygal works so: you should have an original store of files - possibly containing subdirectories (their names serving as headings if not using the album metadata feature). This is the source file hierarchy. It will never be modified by lazygal. Then, when launching:
$ lazygal -o /var/www/MyAlbum /home/user/SourceDir
lazygal will analyze the contents of the source hierarchy and will (re)create the target hierarchy, with all the bells and whistles defined by the templates. Only missing parts or parts that are not up to date will be generated. There is a limitation to this mechanism though: although updates in the source directory, in the metadata or in the themes are detected, changes in command line options and configuration files since last generation are not and the user should manually delete files that need to be generated again.
OPTIONS¶
These programs follow the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included below. For a complete description, see the -h switch.-v --version
-h --help
--quiet
--debug
-o DEST_DIR --output-directory=DEST_DIR
-t THEME --theme=THEME
--default-style=DEFAULT_STYLE
--template-vars=TPL_VARS
-f --force-gen-pages
--clean-destination
--preserve=PATTERN
--excludes=PATTERN
--check-all-dirs
-s IMAGE_SIZE --image-size=IMAGE_SIZE
-T THUMBNAIL_SIZE --thumbnail-size= THUMBNAIL_SIZE
-q QUALITY --quality=QUALITY
-O --original
--orig-base=RELATIVE_PATH
--orig-symlink
Caution
This option is not available on Windows; if you try to use it on that operating system, lazygal will immediately exit with an exit status of 1.
--puburl=PUB_URL
-m --generate-metadata
-n THUMBS_PER_PAGE --thumbs-per-page=THUMBS_PER_PAGE
--filter-by-tag=TAG
--pic-sort-by=ORDER
--subgal-sort-by=ORDER
--dir-flattening-depth=LEVEL
This option makes the program include the web gallery index of child galleries in their parent's gallery index, if their level is greater than the supplied LEVEL. The level of the album root is 0.
Index pages with multiple galleries (which happens when this section is used) show the pictures links in gallery sections.
The following examples show the produced indexes for a sample album (2 sub-galleries, 1 sub-sub-gallery, 1 picture in each one of those).
Example 1. --dir-flattening-depth=No (default)
index.html <- sub-gallery links subgal1/index.html <- index with img1 subgal1/img1.html subgal1/subsubgal1/index.html <- index with img2 subgal1/subsubgal1/img2.html subgal2/index.html <- index with img3 subgal2/img3.html
Example 2. --dir-flattening-depth=0
index.html <- contains index for all pics subgal1/img1.html subgal1/subsubgal1/img2.html subgal2/img3.html
Example 3. --dir-flattening-depth=1
index.html <- contains index for all pics subgal1/index.html <- index with img1 and img2 subgal1/img1.html subgal1/subsubgal1/img2.html subgal2/index.html <- index with img3 subgal2/img3.html
-z --make-dir-zip
--webalbum-pic-bg=WEBALBUMPIC_BG
--webalbum-pic-type=WEBALBUMPIC_TYPE
On the other hand, specifying 'tidy' as the value of this option forces lazygal to skip the rotations, resulting in more regularly shaped thumbnails which can also be more densely packed. This can be an advantage if not all users of your albums have huge screens :-)
--keep-gps-data
THEMES¶
A theme maps to a directory that contains the following items:theme/SHARED_*
theme/browse.thtml
theme/dirindex.thtml or theme/dynindex.thtml
Depending on which index file is present, the theme will be:
dirindex.thtml: fully static
dynindex.thtml: dynamic
theme/*.thtml must be valid XML. See http://genshi.edgewall.org/wiki/Documentation/xml-templates.html for syntax. Dependencies for statically included templates (i.e. with filenames not computed from variables) are automatically computed: when an included template is modified, the software will automatically figure out which pages to re-generate. Missing template files will be searched for in the default theme.
theme/SHARED_* files (common resources for the directory shared) are renamed to strip the SHARED_ prefix and:
Using the theme manifest theme/manifest.json file, it is possible to include files from other directories to be copied into the web album shared files.
Example 4. manifest.json
{ "shared": [ # copy as shared/lib.js { "path": "../lib-2.1.js", "dest": "lib.js" }, # copy as shared/js/lib-2.1.js { "path": "../lib-2.1.js", "dest": "js/" } ] }
Please refer to the examples supplied in /usr/share/lazygal/themes.
ALBUM METADATA¶
If a directory from the source album contains a file named album_description, it is processed as a source of album metadata. The format is borrowed from another album generating tool - Matew. Each line is treated as one possible tag, unknown lines are simply ignored. Example content of this file follows:Example 5. album_description
Album name "My album" Album description "Description, which can be very long." Album image identifier relative/path/to/image.jpg
Otherwise, the user can provide metadata in the following files.
SOURCE_DIR/album-name
SOURCE_DIR/album-description
SOURCE_DIR/album-picture
SOURCE_DIR/PICTURE_FILENAME.comment
Lazygal also extracts information from many metadata tags in image files. Regarding image description, Lazygal searches for comments in this order:
FILES¶
~/.lazygal~/.lazygal/themes
CONFIGURATION FILES¶
Multiple configuration files are processed by lazygal. The configuration is initially set up with the defaults. The defaults can be found in the lazygal source distribution in lazygal/defaults.json.Then, the configuration files are processed in the following order, each newly defined value overloading formerly defined values.
Finally, any command-line-provided parameter takes precedence on any configuration file value.
~/.lazygal/config
SOURCE_DIR/.lazygal
SOURCE_DIR/gal/.lazygal
SIZE DESCRIPTION¶
The size string follows the same syntax as ImageMagick's.scale%
xscale%yscale%
width
xheight
widthxheight
widthxheight^
widthxheight!
widthxheight>
widthxheight<
pixels@
TAG FILTERING¶
Tag filtering supports regular expression matching thanks to the 're' module of Python. All the filter matchings can be indicated to lazygal by successive uses of the 'filter-by-tag' option, or by giving a coma-separated list of keywords.We illustrate here how more elaorated tag filtering can be done.
We want to export only the images that have the tags 'lazygal' AND 'hiking'.
$ lazygal --filter-by-tag=lazygal --filter-by-tag=hiking
or:
$ lazygal --filter-by-tag=lazygal,hiking
We want to export the images that have the tags 'lazygal' OR 'hiking'.
$ lazygal --filter-by-tag="(lazygal|hiking)"
We want to export the images that have one of the tags 'hiking_2012', 'hiking_2013', 'hiking_France', etc.
$ lazygal --filter-by-tag="hiking_.*"
We want to export the images that have the tag 'lazygal', AND one of the tags 'hiking_2012', 'hiking_2013', 'hiking_France', etc.
$ lazygal --filter-by-tag="lazygal,hiking_.*"
SEE ALSO¶
lazygal.conf(5).More information is available on the program website: https://sml.zincube.net/~niol/repositories.git/lazygal/about/.
AUTHOR¶
This manual page was written for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation.On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
COPYRIGHT¶
Copyright © 2010August 2011 | lazygal |