1LAZYGAL(1)                                                          LAZYGAL(1)
2
3
4

NAME

6       lazygal - static web gallery generator
7

SYNOPSIS

9       lazygal -h | -v | options albumdir
10

DESCRIPTION

12       This manual page explains the lazygal program.  This program is a stat‐
13       ic web gallery generator written in Python.
14
15       lazygal works so: you should have an original store of files - possibly
16       containing subdirectories (their names serving as headings if not using
17       the album metadata feature).  This is the source  file  hierarchy.   It
18       will never be modified by lazygal.  Then, when launching:
19
20       $ lazygal -o /var/www/MyAlbum /home/user/SourceDir
21
22       lazygal  will  analyze  the  contents  of the source hierarchy and will
23       (re)create the target hierarchy, with all the bells  and  whistles  de‐
24       fined by the templates.  Only missing parts or parts that are not up to
25       date will be generated.   There  is  a  limitation  to  this  mechanism
26       though: although updates in the source directory, in the metadata or in
27       the themes are detected, changes in command line options and configura‐
28       tion  files  since last generation are not and the user should manually
29       delete files that need to be generated again.
30
31       lazygal source directory crawling will follow symbolic links on  direc‐
32       tories so that you can arrange what you want to publish in any way that
33       suits you without copying data around.
34

OPTIONS

36       These programs follow the usual GNU command line syntax, with long  op‐
37       tions starting with two dashes (`-').  A summary of options is included
38       below.  For a complete description, see the -h switch.
39
40       -v --version
41              Show program's version number and exit.
42
43       -h --help
44              Show summary of options.
45
46       --quiet
47              Don't output anything except for errors.
48
49       --debug
50              Output everything that lazygal is doing.
51
52       -o DEST_DIR --output-directory=DEST_DIR
53              Directory where web pages, slides and  thumbs  will  be  written
54              (default is current directory).
55
56       -t THEME --theme=THEME
57              Theme name (looked up in theme directory) or theme full path.
58
59       --default-style=DEFAULT_STYLE
60              Default style to apply to the theme.  This is actually the file‐
61              name (no extension) of the CSS stylesheet of the theme  that  is
62              not marked as alternate, thus should get used as default or pre‐
63              ferred by the web browser.
64
65       --template-vars=TPL_VARS
66              Common variables to load all templates with,  e.g.   --template-
67              vars='footer=foo  bar,color=baz'.  For longer variable contents,
68              it is easier to use a configuration file (see LAZYGAL-CONF).
69
70       -f --force-gen-pages
71              Force rebuild of web pages, regardless of the modification times
72              of their dependencies.  This is handy when changing a configura‐
73              tion option affecting these (theme, directory flattening, etc.).
74
75       --clean-destination
76              Clean destination directory of files that should not be there.
77
78       --preserve=PATTERN
79              Specify a file pattern (or name) which should be ignored  during
80              cleanup  of  the  destination.  May be specified more than once.
81              Values given here will be in addition to those specified in con‐
82              figuration files.
83
84       --exclude=PATTERN
85              Specify  a file pattern (or name) which should be ignored during
86              processing.  May be specified more than once.  Values given here
87              will be in addition to those specified in configuration files.
88
89       --check-all-dirs
90              Exhaustively  go  through  all  directories regardless of source
91              modification time.
92
93       -s IMAGE_SIZE --image-size=IMAGE_SIZE
94              Size   of    images,    define    as    name=xxy,    ...,    eg.
95              small=800x600,medium=1024x768.   The  special dimensions 0x0 use
96              original size.  Refer to the IMAGE  RESIZE  DESCRIPTION  section
97              for  more  information  on  the available syntax.  The number of
98              sizes provided will define the number of sizes that will be gen‐
99              erated: --image-size="medium=800x600" will only generate all im‐
100              ages   for   a   medium   size   (no   small   size)    --image-
101              size="small=640x480,medium=800x600,large=1024x768" will generate
102              3 sizes for all images (small, medium, large)
103
104       -T THUMBNAIL_SIZE --thumbnail-size=THUMBNAIL_SIZE
105              Size of thumbnails, eg.  150x113.  Refer to the IMAGE RESIZE DE‐
106              SCRIPTION section for more information on the available syntax.
107
108       -q QUALITY --quality=QUALITY
109              Quality of generated JPEG images (default is 85).
110
111       -O --original
112              Include original photos in output.
113
114       --orig-base=RELATIVE_PATH
115              Do  not  copy  original photos in output directory, instead link
116              them using RELATIVE_PATH as  base  for  those  links  (discarded
117              without -O).
118
119       --orig-symlink
120              Do  not copy original photos in output directory, instead create
121              symlinks to their original locations.  This is useful  when  you
122              plan  transferring  the whole directory which `generated to some
123              other location, perhaps withrsync`, and you wish to avoid creat‐
124              ing an extra copy of each photo.
125
126                     Caution
127
128                     This  option  is  not available on Windows; if you try to
129                     use it on that operating system, lazygal will immediately
130                     exit with an exit status of 1.
131
132       --puburl=PUB_URL
133              Publication URL (only useful for feed generation).
134
135       -m --generate-metadata
136              Generate  metadata  description  files where they don't exist in
137              the source tree instead of generating  the  web  gallery.   This
138              disables all other options.
139
140       -n THUMBS_PER_PAGE --thumbs-per-page=THUMBS_PER_PAGE
141              Maximum  number  of  thumbs  per index page.  This enables index
142              pagination (0 is unlimited).
143
144       --filter-by-tag=TAG
145              If set, lazygal will only export the pictures that have  one  of
146              their  (IPTC)  tags matching TAG.  It is also possible to use an
147              equivalent of AND and OR boolean tests to filter tags.  For more
148              details, read below the section TAG FILTERING.
149
150       --pic-sort-by=ORDER
151              Sort  order  for  images  in a subgallery, among 'mtime', 'file‐
152              name', 'numeric', or 'exif'.  (default is  'exif'  which  is  by
153              EXIF date if EXIF data is available, filename otherwise, sorting
154              EXIF-less images before).  'numeric' does a numeric sort on  the
155              numeric  part  of  the  filename.  Add ':reverse' to reverse the
156              sort order (e.g. --pic-sort-by=mtime:reverse).
157
158       --subgal-sort-by=ORDER
159              Sort order for subgalleries, among 'exif' (EXIF date of the lat‐
160              est  picture  in  sub-gallery), 'mtime', 'dirname', or 'numeric'
161              (default is 'dirname').  'numeric' does a numeric  sort  on  the
162              numeric part of the dirname.  Add ':reverse' to reverse the sort
163              order (e.g. --subgal-sort-by=dirname:reverse).
164
165       --dir-flattening-depth=LEVEL
166              Level below which the directory tree is flattened.   Default  is
167              no flattening ('No').
168
169              This  option  makes the program include the web gallery index of
170              child galleries in their parent's gallery index, if their  level
171              is greater than the supplied LEVEL.  The level of the album root
172              is 0.
173
174              Index pages with multiple galleries  (which  happens  when  this
175              section is used) show the pictures links in gallery sections.
176
177              The  following  examples  show the produced indexes for a sample
178              album (2 sub-galleries, 1 sub-sub-gallery, 1 picture in each one
179              of those).
180
181              Example 1.  –dir-flattening-depth=No (default)
182
183                     index.html <- sub-gallery links
184                     subgal1/index.html <- index with img1
185                     subgal1/img1.html
186                     subgal1/subsubgal1/index.html <- index with img2
187                     subgal1/subsubgal1/img2.html
188                     subgal2/index.html <- index with img3
189                     subgal2/img3.html
190
191              Example 2.  –dir-flattening-depth=0
192
193                     index.html <- contains index for all pics
194                     subgal1/img1.html
195                     subgal1/subsubgal1/img2.html
196                     subgal2/img3.html
197
198              Example 3.  –dir-flattening-depth=1
199
200                     index.html <- contains index for all pics
201                     subgal1/index.html <- index with img1 and img2
202                     subgal1/img1.html
203                     subgal1/subsubgal1/img2.html
204                     subgal2/index.html <- index with img3
205                     subgal2/img3.html
206
207       -z --make-dir-zip
208              Make a zip archive of original pictures for each directory.
209
210       --webalbum-pic-bg=WEBALBUMPIC_BG
211              Webalbum  picture background color.  Default is transparent, and
212              implies the PNG format.  Any other value, e.g. red, white, blue,
213              uses JPEG.
214
215       --webalbum-pic-type=WEBALBUMPIC_TYPE
216              What  type  of  web  album  thumbnails to generate.  By default,
217              lazygal generates the well-loved "messy" thumbnails with random‐
218              ly  selected  pictures  from  the album each rotated by a random
219              amount and pasted together.  This default can also be forced  by
220              specifying 'messy' as WEBALBUMPIC_TYPE.
221
222              On the other hand, specifying 'tidy' as the value of this option
223              forces lazygal to skip the rotations, resulting in more regular‐
224              ly  shaped  thumbnails  which  can  also be more densely packed.
225              This can be an advantage if not all users of  your  albums  have
226              huge screens :-)
227
228       --keep-gps-data
229              Do  not remove GPS data from EXIF tags.  By default the location
230              tags are removed for privacy reasons.  However, there are situa‐
231              tions  when having the location data makes sense and is desired.
232              This is mostly meant to be used with holiday photos.
233
234       --no-video
235              Do not process videos nor include them in indexes.
236

THEMES

238       A theme maps to a directory that contains the following items:
239
240       theme/SHARED_*
241              Files to put in the  web  gallery  directory  shared,  e.g. CSS,
242              Javascript, images or other resources common to all galleries.
243
244       theme/browse.thtml
245              The  XHTML  template  for  the theme browse page (displaying one
246              picture).
247
248       theme/dirindex.thtml or theme/dynindex.thtml
249              The XHTML template for the directory index  page  (pictures  and
250              sub-galleries links).
251
252       Depending on which index file is present, the theme will be:
253
254       dirindex.thtml: fully static
255              one HTML page per picture, per size and one index per size, or
256
257       dynindex.thtml: dynamic
258              only one index per directory is to be generated.
259
260       theme/*.thtml  must  be  valid XML.  See http://genshi.edgewall.org/wi
261       ki/Documentation/xml-templates.html for syntax.  Dependencies for stat‐
262       ically  included templates (i.e. with filenames not computed from vari‐
263       ables) are automatically computed: when an included template  is  modi‐
264       fied, the software will automatically figure out which pages to re-gen‐
265       erate.  Missing template files will be  searched  for  in  the  default
266       theme.
267
268       theme/SHARED_*  files  (common  resources for the directory shared) are
269       renamed to strip the SHARED_ prefix and:
270
271       • Processed using the Genshi  text  template  engine  (see  http://gen
272         shi.edgewall.org/wiki/Documentation/text-templates.html  for syntax.)
273         if their file extension starts with t,
274
275       • Copied to the web album destination otherwise.
276
277       Using the theme manifest theme/manifest.json file, it  is  possible  to
278       include  files  from  other directories to be copied into the web album
279       shared files.
280
281              {
282                  "shared": [
283                      # copy as shared/lib.js
284                      { "path": "../lib-2.1.js", "dest": "lib.js" },
285
286                      # copy as shared/js/lib-2.1.js
287                      { "path": "../lib-2.1.js", "dest": "js/" }
288
289                      # copy first found as shared/lib.js
290                      # instruct ./setup.py dl_assets to download it from url otherwise
291                      { "path": [ "/usr/share/javascript/lib-2.1.js", "lib.js"],
292                        "dest": "lib.js",
293                        "url": "https://lib.com/lib-latest.js"
294                      },
295
296                      # copy prefixed files in shared/
297                      { "path": "SHARED_*" },
298                  ]
299              }
300
301
302       Please refer to the examples supplied in /usr/share/lazygal/themes.
303

ALBUM METADATA

305       If a directory from the source album contains a  file  named  album_de‐
306       scription,  it  is processed as a source of album metadata.  The format
307       is borrowed from another album generating tool - Matew.  Each  line  is
308       treated as one possible tag, unknown lines are simply ignored.  Example
309       content of this file follows:
310
311              Album name "My album"
312              Album description "Description, which can be very long."
313              Album image identifier relative/path/to/image.jpg
314
315       Otherwise, the user can provide metadata in the following files.
316
317       SOURCE_DIR/album-name
318              The title to use for this album directory.
319
320       SOURCE_DIR/album-description
321              The description for this album directory.  HTML  tags  are  used
322              verbatim from this file.
323
324       SOURCE_DIR/album-picture
325              The  relative  path  to the image to use at the top of the album
326              picture stack.
327
328       SOURCE_DIR/PICTURE_FILENAME.comment
329              The description to use for this particular image.   Please  note
330              that  HTML tags are taken as provided in this file for output in
331              the templates.
332
333       Lazygal also extracts information from  many  metadata  tags  in  image
334       files.   Regarding  image description, Lazygal searches for comments in
335       this order:
336
337       1. pic.jpeg.comment file
338
339       2. Exif.Photo.UserComment
340
341       3. Exif.Image.ImageDescription
342
343       4. Iptc.Application2.ObjectName
344
345       5. JPEG comment
346

FILES

348       ~/.lazygal
349              User configuration directory.
350
351       ~/.lazygal/themes
352              User themes directory.
353

CONFIGURATION FILES

355       Multiple configuration files are processed by DHPACKAGE.  The  configu‐
356       ration  is  initially  set  up  with the defaults.  The defaults can be
357       found in the DHPACKAGE source distribution in lazygal/defaults.json.
358
359       Then, the configuration files are processed  in  the  following  order,
360       each newly defined value overloading formerly defined values.
361
362       Finally,  any  command-line-provided  parameter takes precedence on any
363       configuration file value.
364
365       ~/.lazygal/config
366              User configuration file.  See LAZYGAL-CONF for format.
367
368       SOURCE_DIR/.lazygal
369              Album root configuration file.  See LAZYGAL-CONF for format.
370
371       SOURCE_DIR/gal/.lazygal
372              Web gallery configuration file.  Only the webgal  and  template-
373              vars sections are red in these files.  The configuration applies
374              to the gallery representing the directory of  the  configuration
375              file,  and all of its sub-directories, unless another configura‐
376              tion file in a sub-directory overloads some of the defined  con‐
377              figuration values.  See LAZYGAL-CONF for format.
378

SIZE DESCRIPTION

380       The size string follows the same syntax as ImageMagick's.
381
382       scale% Height and width both scaled by specified percentage.
383
384       xscale%yscale%
385              Height and width individually scaled by specified percentages.
386
387       width  Width  given,  height  automatically selected to preserve aspect
388              ratio.
389
390       xheight
391              Height given, width automatically selected  to  preserve  aspect
392              ratio.
393
394       widthxheight
395              Maximum  values  of  height  and  width given, aspect ratio pre‐
396              served.
397
398       widthxheight^
399              Minimum values of width and  height  given,  aspect  ratio  pre‐
400              served.
401
402       widthxheight!
403              Width  and  height emphatically given, original aspect ratio ig‐
404              nored.
405
406       widthxheight>
407              Change as per the supplied dimensions but only if an  image  di‐
408              mension exceeds a specified dimension.
409
410       widthxheight<
411              Change dimensions only if both image dimensions exceed specified
412              dimensions.
413
414       pixels@
415              Resize image to have specified area in pixels.  Aspect ratio  is
416              preserved.
417

TAG FILTERING

419       Tag  filtering  supports regular expression matching thanks to the 're'
420       module of Python.  All the filter matchings can be indicated to lazygal
421       by  successive uses of the 'filter-by-tag' option, or by giving a coma-
422       separated list of keywords.
423
424       We illustrate here how more elaorated tag filtering can be done.
425
426       We want to export only the images that  have  the  tags  'lazygal'  AND
427       'hiking'.
428
429       $ lazygal --filter-by-tag=lazygal --filter-by-tag=hiking
430
431       or:
432
433       $ lazygal --filter-by-tag=lazygal,hiking
434
435       We want to export the images that have the tags 'lazygal' OR 'hiking'.
436
437       $ lazygal --filter-by-tag="(lazygal|hiking)"
438
439       We  want  to export the images that have one of the tags 'hiking_2012',
440       'hiking_2013', 'hiking_France', etc.
441
442       $ lazygal --filter-by-tag="hiking_.*"
443
444       We want to export the images that have the tag 'lazygal',  AND  one  of
445       the tags 'hiking_2012', 'hiking_2013', 'hiking_France', etc.
446
447       $ lazygal --filter-by-tag="lazygal,hiking_.*"
448

SEE ALSO

450       lazygal.conf(5)
451
452       More  information is available on the program website: https://sml.zin
453       cube.net/~niol/repositories.git/lazygal/about/.
454

AUTHOR

456       This manual page was written for the DEBIAN system (but may be used  by
457       others).   Permission is granted to copy, distribute and/or modify this
458       document under the terms of the GNU General Public License,  Version  2
459       any later version published by the Free Software Foundation.
460
461       On  Debian systems, the complete text of the GNU General Public License
462       can be found in /usr/share/common-licenses/GPL.
463

AUTHORS

465       Alexandre Rossi.
466
467
468
469                                                                    LAZYGAL(1)
Impressum