lazygal.1.xml 30.7 KB
Newer Older
1 2 3 4
<?xml version='1.0' encoding='ISO-8859-1'?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [

5 6 7
  <!ENTITY % lazygalent SYSTEM "lazygal.ent">
  %lazygalent;

8
  <!-- Please adjust the date whenever revising the manpage. -->
9 10 11 12 13 14 15 16
  <!ENTITY dhdate         "<date>August 2011</date>">
  <!ENTITY dhsection      "1">
  <!ENTITY dhsectiontitle "User commands">
  <!ENTITY dhpackage      "lazygal">
  <!ENTITY dhtitle        "lazygal">
  <!ENTITY debian         "<productname>Debian</productname>">
  <!ENTITY gnu            "<acronym>GNU</acronym>">
  <!ENTITY gpl            "&gnu; <acronym>GPL</acronym>">
17 18 19 20 21
]>

<refentry>
  <refentryinfo>
    <copyright>
22
      <year>2010</year>
23 24 25 26 27
      <holder></holder>
    </copyright>
    &dhdate;
  </refentryinfo>
  <refmeta>
28 29 30 31
    <refentrytitle>LAZYGAL</refentrytitle>
    <manvolnum>&dhsection;</manvolnum>
    <refmiscinfo class="source">&dhpackage;</refmiscinfo>
    <refmiscinfo class="manual">&dhsectiontitle;</refmiscinfo>
32 33
  </refmeta>
  <refnamediv>
34
    <refname>&dhtitle;</refname>
35 36 37 38 39 40 41 42 43 44
    <refpurpose>static web gallery generator</refpurpose>
  </refnamediv>
  <refsynopsisdiv>
    <cmdsynopsis>
      <command>&dhpackage;</command>
      <arg><option>-h | -v |
      <arg><replaceable>options</replaceable></arg></option>
      <replaceable>albumdir</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>
45

46 47 48 49 50 51 52
  <refsect1>
    <title>DESCRIPTION</title>

    <para>This manual page explains the <command>&dhpackage;</command>
    program. This program is a static web gallery generator written in
    Python.</para>

53
    <para><command>&dhpackage;</command> works so: you should have
54
    an original store of files - possibly containing subdirectories
55 56 57 58 59 60 61 62
    (their names serving as headings if not using the album metadata
    feature). This is the source file hierarchy. It will never be modified
    by <command>&dhpackage;</command>. Then, when launching:</para>

    <para><literal>$ lazygal -o /var/www/MyAlbum
    /home/user/SourceDir</literal></para>

    <para><command>&dhpackage;</command> will analyze the contents of the
63
    source hierarchy and will (re)create the target hierarchy, with
64
    all the bells and whistles defined by the templates. Only missing
65 66
    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
67
    directory, in the metadata or in the themes are detected, changes in
68 69 70
    command line options and configuration files since last generation are
    not and the user should manually delete files that need to be generated
    again.</para>
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
  </refsect1>
  <refsect1>
    <title>OPTIONS</title>

    <para>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
      <option>-h</option> switch.</para>

    <variablelist>

      <varlistentry>
        <term>
          <option>-v</option>
          <option>--version</option>
        </term>
        <listitem>
          <para>Show program's version number and exit.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-h</option>
          <option>--help</option>
        </term>
        <listitem>
          <para>Show summary of options.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--quiet</option>
        </term>
        <listitem>
          <para>Don't output anything except for errors.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--debug</option>
        </term>
        <listitem>
          <para>Output everything that &dhpackage; is doing.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-o <replaceable>DEST_DIR</replaceable></option>
          <option>--output-directory=<replaceable>DEST_DIR</replaceable>
          </option>
        </term>
        <listitem>
          <para>Directory where web pages, slides and thumbs will be
          written (default is current directory).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-t <replaceable>THEME</replaceable></option>
          <option>--theme=<replaceable>THEME</replaceable></option>
        </term>
        <listitem>
          <para>Theme name (looked up in theme directory) or theme full path.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--default-style=<replaceable>DEFAULT_STYLE</replaceable>
          </option>
        </term>
        <listitem>
149 150 151 152
          <para>Default style to apply to the theme. This is actually
          the filename (no extension) of the CSS stylesheet of the theme
          that is not marked as <option>alternate</option>, thus should
          get used as default or prefered by the web browser.</para>
153 154 155 156 157 158 159 160
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--template-vars=<replaceable>TPL_VARS</replaceable></option>
        </term>
        <listitem>
161 162 163 164
          <para>Common variables to load all templates with, e.g.
          <option>--template-vars='footer=foo bar,color=baz'</option>. For
          longer variable contents, it is easier to use a configuration
          file (see &lazygal-conf;).</para>
165 166 167
        </listitem>
      </varlistentry>

168 169 170 171 172 173 174 175 176 177 178 179 180
      <varlistentry>
        <term>
          <option>-f</option>
          <option>--force-gen-pages</option>
        </term>
        <listitem>
          <para>Force rebuild of web pages, regardless of the modification
          times of their dependencies. This is handy when changing a
          configuration option affecting these (theme, directory
          flattening, etc.).</para>
        </listitem>
      </varlistentry>

181 182 183 184 185 186
      <varlistentry>
        <term>
          <option>--clean-destination</option>
        </term>
        <listitem>
          <para>Clean destination directory of files that should not
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
          be there.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--preserve=<replaceable>PATTERN</replaceable></option>
        </term>
        <listitem>
          <para>Specify a file pattern (or name) which should be
          ignored during cleanup of the destination.  May be specified
          more than once.
          Values given here will be in addition to those specified in
          configuration files.
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--excludes=<replaceable>PATTERN</replaceable></option>
        </term>
        <listitem>
          <para>Specify a file pattern (or name) which should be
          ignored during processing.  May be specified more than once.
          Values given here will be in addition to those specified in
          configuration files.
          </para>
215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--check-all-dirs</option>
        </term>
        <listitem>
          <para>Exhaustively go through all directories regardless of
          source modification time.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-s <replaceable>IMAGE_SIZE</replaceable></option>
          <option>--image-size=<replaceable>IMAGE_SIZE</replaceable></option>
        </term>
        <listitem>
          <para>Size of images, define as
          <replaceable>name</replaceable>=<replaceable>x</replaceable>x<replaceable>y</replaceable>,
          ..., eg.
          small=800x600,medium=1024x768. The special dimensions
238 239
          0x0 use original size. Refer to the IMAGE RESIZE DESCRIPTION section
          for more information on the available syntax.</para>
240 241 242 243 244 245 246 247 248 249
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-T <replaceable>THUMBNAIL_SIZE</replaceable></option>
          <option>--thumbnail-size=<replaceable>THUMBNAIL_SIZE</replaceable>
          </option>
        </term>
        <listitem>
250 251 252
          <para>Size of thumbnails, eg. 150x113.
          Refer to the IMAGE RESIZE DESCRIPTION section for more information
          on the available syntax.</para>
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286
        </listitem>
      </varlistentry>

     <varlistentry>
        <term>
          <option>-q <replaceable>QUALITY</replaceable></option>
          <option>--quality=<replaceable>QUALITY</replaceable></option>
        </term>
        <listitem>
          <para>Quality of generated JPEG images (default is 85).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-O</option>
          <option>--original</option>
        </term>
        <listitem>
          <para>Include original photos in output.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--orig-base=<replaceable>RELATIVE_PATH</replaceable></option>
        </term>
        <listitem>
          <para>Do not copy original photos in output directory, instead
          link them using <replaceable>RELATIVE_PATH</replaceable> as base
          for those links (discarded without <option>-O</option>).</para>
        </listitem>
      </varlistentry>

287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307
      <varlistentry>
        <term>
          <option>--orig-symlink</option>
        </term>
        <listitem>
          <para>Do not copy original photos in output directory, instead
          create symlinks to their original locations.  This is useful
          when you plan transferring the whole directory which
          <command>&dhpackage;</command> generated to some other
          location, perhaps with <command>rsync</command>, and you wish
          to avoid creating an extra copy of each photo.</para>

          <caution>
            <para>This option is not available on Windows; if you try to
            use it on that operating system,
            <command>&dhpackage;</command> will immediately exit with an
            exit status of 1. </para>
          </caution>
        </listitem>
      </varlistentry>

308 309 310 311 312
      <varlistentry>
        <term>
          <option>--puburl=<replaceable>PUB_URL</replaceable></option>
        </term>
        <listitem>
313
          <para>Publication URL (only useful for feed generation).</para>
314 315 316 317 318 319 320 321 322 323
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-m</option>
          <option>--generate-metadata</option>
        </term>
        <listitem>
          <para>Generate metadata description files where they don't
324 325
          exist in the source tree instead of generating the web gallery.
          This disables all other options.</para>
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>-n <replaceable>THUMBS_PER_PAGE</replaceable></option>
          <option>--thumbs-per-page=<replaceable>THUMBS_PER_PAGE</replaceable>
          </option>
        </term>
        <listitem>
          <para>Maximum number of thumbs per index page. This enables
          index pagination (0 is unlimited).</para>
        </listitem>
      </varlistentry>

341 342 343 344 345 346 347
      <varlistentry>
        <term>
          <option>--filter-by-tag=<replaceable>TAG</replaceable>
          </option>
        </term>
        <listitem>
            <para>If set, lazygal will only export the pictures that have one
348
                of their (IPTC) tags matching TAG.
349 350 351 352 353 354
                It is also possible to use an equivalent of AND and OR boolean tests to filter tags.
                For more details, read below the section <replaceable>TAG FILTERING</replaceable>.
            </para>
        </listitem>
      </varlistentry>

355 356 357 358 359 360
      <varlistentry>
        <term>
          <option>--pic-sort-by=<replaceable>ORDER</replaceable></option>
        </term>
        <listitem>
          <para>Sort order for images in a subgallery, among 'mtime',
361 362 363 364 365
          'filename', 'numeric', or 'exif'. (default is 'exif' which is by
          EXIF date if EXIF data is available, filename otherwise,
          sorting EXIF-less images before). 'numeric' does a numeric sort on
          the numeric part of the filename.  Add ':reverse' to reverse the
          sort order
366 367 368 369 370 371 372 373 374
          (e.g. <option>--pic-sort-by=mtime:reverse</option>).</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--subgal-sort-by=<replaceable>ORDER</replaceable></option>
        </term>
        <listitem>
375
          <para>Sort order for subgalleries, among 'exif' (EXIF date of the
376 377 378
          latest picture in sub-gallery), 'mtime', 'dirname', or 'numeric'
          (default is 'dirname'). 'numeric' does a numeric sort on the
          numeric part of the dirname. Add ':reverse' to reverse the sort order
379
          (e.g. <option>--subgal-sort-by=dirname:reverse</option>).
380 381 382 383
          </para>
        </listitem>
      </varlistentry>

384 385 386 387 388
      <varlistentry>
        <term>
          <option>--dir-flattening-depth=<replaceable>LEVEL</replaceable></option>
        </term>
        <listitem>
389
          <para>Level below which the directory tree is flattened. Default is
390
          no flattening ('No').</para>
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
          <para>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 <replaceable>LEVEL</replaceable>. The level
          of the album root is 0.</para>
          <para>Index pages with multiple galleries (which happens when this
          section is used) show the pictures links in gallery sections.</para>
          <para>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).</para>
          <example>
            <title>--dir-flattening-depth=No (default)</title>
            <programlisting>
              index.html &lt;- sub-gallery links
              subgal1/index.html &lt;- index with img1
              subgal1/img1.html
              subgal1/subsubgal1/index.html &lt;- index with img2
              subgal1/subsubgal1/img2.html
              subgal2/index.html &lt;- index with img3
              subgal2/img3.html
            </programlisting>
          </example>
          <example>
            <title>--dir-flattening-depth=0</title>
            <programlisting>
              index.html &lt;- contains index for all pics
              subgal1/img1.html
              subgal1/subsubgal1/img2.html
              subgal2/img3.html
            </programlisting>
          </example>
          <example>
            <title>--dir-flattening-depth=1</title>
            <programlisting>
              index.html &lt;- contains index for all pics
              subgal1/index.html &lt;- index with img1 and img2
              subgal1/img1.html
              subgal1/subsubgal1/img2.html
              subgal2/index.html &lt;- index with img3
              subgal2/img3.html
            </programlisting>
          </example>
432 433 434
        </listitem>
      </varlistentry>

435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457
      <varlistentry>
        <term>
          <option>-z</option>
          <option>--make-dir-zip</option>
        </term>
        <listitem>
          <para>Make a zip archive of original pictures for each
          directory.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--webalbum-pic-bg=<replaceable>WEBALBUMPIC_BG</replaceable>
          </option>
        </term>
        <listitem>
          <para>Webalbum picture background color. Default is transparent,
          and implies the PNG format. Any other value, e.g. red, white,
          blue, uses JPEG.</para>
        </listitem>
      </varlistentry>

458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493
      <varlistentry>
        <term>
          <option>--webalbum-pic-type=<replaceable>WEBALBUMPIC_TYPE</replaceable>
          </option>
        </term>
        <listitem>
          <para>What type of web album thumbnails to generate.  By default,
          lazygal generates the well-loved "messy" thumbnails with
          randomly selected pictures from the album each rotated by a
          random amount and pasted together.  This default can also be
          forced by specifying 'messy' as
          <replaceable>WEBALBUMPIC_TYPE</replaceable>.
          </para>
          <para>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 :-)
          </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
          <option>--keep-gps-data
          </option>
        </term>
        <listitem>
          <para>Do not remove GPS data from EXIF tags. By default the location
          tags are removed for privacy reasons. However, there are situations
          when having the location data makes sense and is desired. This is
          mostly meant to be used with holiday photos.
          </para>
        </listitem>
      </varlistentry>

494 495 496 497 498 499
  </variablelist>
  </refsect1>

  <refsect1>
    <title>THEMES</title>

500
    <para>A theme maps to a directory that contains the following items:</para>
501 502 503

    <variablelist>

504 505 506 507
        <varlistentry>
            <term><filename><replaceable>theme</replaceable>/SHARED_*</filename></term>
            <listitem>
                <para>Files to put in the web gallery
508
                directory <filename>shared</filename>, e.g. CSS, Javascript,
509
                images or other resources common to all galleries.</para>
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527
            </listitem>
        </varlistentry>

        <varlistentry>
            <term><filename><replaceable>theme</replaceable>/browse.thtml</filename></term>
            <listitem>
                <para>The XHTML template for the theme browse page (displaying
                one picture).</para>
            </listitem>
        </varlistentry>

        <varlistentry>
            <term><filename><replaceable>theme</replaceable>/dirindex.thtml</filename> or <filename><replaceable>theme</replaceable>/dynindex.thtml</filename></term>
            <listitem>
                <para>The XHTML template for the directory index page (pictures
                and sub-galleries links).</para>
            </listitem>
        </varlistentry>
528 529 530

    </variablelist>

531
    <para>Depending on which index file is present, the theme will be:</para>
532

533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551
    <variablelist>
        <varlistentry>
            <term><filename>dirindex.thtml</filename>: fully static</term>
            <listitem>
                <para>one HTML page per picture, per size and one index per
                size, or</para>
            </listitem>
        </varlistentry>

        <varlistentry>
            <term><filename>dynindex.thtml</filename>: dynamic</term>
            <listitem>
                <para>only one index per directory is to be generated.</para>
            </listitem>
        </varlistentry>
    </variablelist>

    <para><filename><replaceable>theme</replaceable>/*.thtml</filename> must
    be valid XML. See
552
    <filename>http://genshi.edgewall.org/wiki/Documentation/xml-templates.html</filename>
553 554 555
    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
556 557
    out which pages to re-generate. Missing template files will be searched for
    in the <parameter>default</parameter> theme.</para>
558

559
    <para><filename><replaceable>theme</replaceable>/SHARED_*</filename> files
560
    (common resources for the directory <filename>shared</filename>) are
561
    renamed to strip the <parameter>SHARED_</parameter> prefix and:</para>
562

563 564 565 566 567 568 569 570 571 572 573 574
    <itemizedlist>
        <listitem>
            <para>Processed using the Genshi text template engine (see
            <filename>http://genshi.edgewall.org/wiki/Documentation/text-templates.html</filename>
            for syntax.) if their file extension starts with
            <parameter>t</parameter>,</para>
        </listitem>

        <listitem>
            <para>Copied to the web album destination otherwise.</para>
        </listitem>
    </itemizedlist>
575

576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595
    <para>Using the theme manifest
    <filename><replaceable>theme</replaceable>/manifest.json</filename> file,
    it is possible to include files from other directories to be copied into
    the web album shared files.</para>

    <example>
      <title>manifest.json</title>
        <programlisting>
{
    "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/" }
    ]
}
        </programlisting>
    </example>

596
    <para>Please refer to the examples supplied in
597
    <filename>/usr/share/lazygal/themes</filename>.</para>
598

599 600 601 602
  </refsect1>

  <refsect1>
    <title>ALBUM METADATA</title>
603

604 605
    <para>If a directory from the source album contains a file named
    <filename>album_description</filename>, it is processed as a source
606 607 608 609 610 611 612 613 614 615 616 617 618
    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: </para>

    <example>
      <title>album_description</title>
        <programlisting>
Album name "My album"
Album description "Description, which can be very long."
Album image identifier relative/path/to/image.jpg
        </programlisting>
    </example>
619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642

    <para>Otherwise, the user can provide metadata in the following
    files.</para>

    <variablelist>

      <varlistentry>
        <term><filename><parameter>SOURCE_DIR</parameter>/album-name</filename></term>
        <listitem>
            <para>The title to use for this album directory.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><filename><parameter>SOURCE_DIR</parameter>/album-description</filename></term>
        <listitem>
            <para>The description for this album directory. HTML tags are
            used verbatim from this file.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><filename><parameter>SOURCE_DIR</parameter>/album-picture</filename></term>
        <listitem>
643 644
            <para>The relative path to the image to use at the top of the
            album picture stack.</para>
645 646 647 648 649 650 651 652 653 654 655 656
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><filename><parameter>SOURCE_DIR</parameter>/<parameter>PICTURE_FILENAME</parameter>.comment</filename></term>
        <listitem>
            <para>The description to use for this particular image. Please
            note that HTML tags are taken as provided in this file for
            output in the templates.</para>
        </listitem>
      </varlistentry>

657 658 659 660 661 662 663 664 665 666 667 668 669 670 671
    </variablelist>

    <para>Lazygal also extracts information from many metadata tags in
    image files. Regarding image description, Lazygal searches for comments
    in this order:</para>

    <orderedlist>
      <listitem><para>
        <filename><replaceable>pic.jpeg</replaceable>.comment</filename> file
      </para></listitem>
      <listitem><para><literal>Exif.Photo.UserComment</literal></para></listitem>
      <listitem><para><literal>Exif.Image.ImageDescription</literal></para></listitem>
      <listitem><para><literal>Iptc.Application2.ObjectName</literal></para></listitem>
      <listitem><para>JPEG comment</para></listitem>
    </orderedlist>
672

673 674 675 676 677 678 679 680 681 682 683 684 685 686
  </refsect1>

  <refsect1>
    <title>FILES</title>

    <variablelist>

      <varlistentry>
        <term><filename>~/.lazygal</filename></term>
        <listitem>
            <para>User configuration directory.</para>
        </listitem>
      </varlistentry>

687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703
      <varlistentry>
        <term><filename>~/.lazygal/themes</filename></term>
        <listitem>
            <para>User themes directory.</para>
        </listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

  <refsect1>
    <title>CONFIGURATION FILES</title>

    <para>Multiple configuration files are processed by &dhpackage;.
    The configuration is initially set up with the defaults. The defaults
    can be found in the &dhpackage; source distribution in
704
    <filename>lazygal/defaults.json</filename>.</para>
705 706 707 708 709 710 711 712 713

    <para>Then, the configuration files are processed in the following order,
    each newly defined value overloading formerly defined values.</para>

    <para>Finally, any command-line-provided parameter takes precedence on
    any configuration file value.</para>

    <variablelist>

714 715 716
      <varlistentry>
        <term><filename>~/.lazygal/config</filename></term>
        <listitem>
717
            <para>User configuration file. See &lazygal-conf; for format.</para>
718 719 720
        </listitem>
      </varlistentry>

721 722 723 724 725
      <varlistentry>
        <term>
            <filename><parameter>SOURCE_DIR</parameter>/.lazygal</filename>
        </term>
        <listitem>
726 727
            <para>Album root configuration file. See &lazygal-conf; for format.
            </para>
728 729 730
        </listitem>
      </varlistentry>

731
      <varlistentry>
732 733 734
        <term>
            <filename><parameter>SOURCE_DIR/gal</parameter>/.lazygal</filename>
        </term>
735
        <listitem>
736 737 738 739 740 741 742 743
            <para>Web gallery configuration file. Only the
            <parameter>webgal</parameter> and
            <parameter>template-vars</parameter> sections are red in these
            files. The configuration applies to the gallery representing the
            directory of the configuration file, and all of its sub-directories,
            unless another configuration file in a sub-directory overloads some
            of the defined configuration values. See &lazygal-conf; for format.
            </para>
744 745 746 747 748 749 750
        </listitem>
      </varlistentry>

    </variablelist>

  </refsect1>

751

752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839
  <refsect1>
    <title>SIZE DESCRIPTION</title>

    <para>The size string follows the same syntax as ImageMagick's.</para>

      <varlistentry>
        <term><parameter>scale</parameter>%</term>
        <listitem>
            <para>Height and width both scaled by specified percentage.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
            <parameter>xscale</parameter>%<parameter>yscale</parameter>%
        </term>
        <listitem>
            <para>Height and width individually scaled by specified percentages.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>width</parameter></term>
        <listitem>
            <para>Width given, height automatically selected to preserve aspect ratio.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>x<parameter>height</parameter></term>
        <listitem>
            <para>Height given, width automatically selected to preserve aspect ratio.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>width</parameter>x<parameter>height</parameter></term>
        <listitem>
            <para>Maximum values of height and width given, aspect ratio
            preserved.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>width</parameter>x<parameter>height</parameter>^</term>
        <listitem>
            <para>Minimum values of width and height given, aspect ratio
            preserved.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>width</parameter>x<parameter>height</parameter>!</term>
        <listitem>
            <para>Width and height emphatically given, original aspect ratio ignored.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
            <parameter>width</parameter>x<parameter>height</parameter>&gt;
        </term>
        <listitem>
            <para>Change as per the supplied dimensions but only if an image
            dimension exceeds a specified dimension.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>
            <parameter>width</parameter>x<parameter>height</parameter>&lt;
        </term>
        <listitem>
            <para>Change dimensions only if both image dimensions exceed
            specified dimensions.</para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>pixels</parameter>@</term>
        <listitem>
            <para>Resize image to have specified area in pixels. Aspect
            ratio is preserved.</para>
        </listitem>
      </varlistentry>

  </refsect1>

840 841 842 843 844
  <refsect1>
    <title>TAG FILTERING</title>
    <para> 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. </para>

845
    <para>
846 847
        We illustrate here how more elaorated tag filtering can be done. </para>

848
    <para> We want to export only the images that have the tags 'lazygal' AND 'hiking'.
849 850 851
    </para>

    <informalexample><programlisting>
852
        $ lazygal --filter-by-tag=lazygal --filter-by-tag=hiking
853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887
    </programlisting></informalexample>

    <para>
        or:
    </para>

    <informalexample><programlisting>
        $ lazygal --filter-by-tag=lazygal,hiking
    </programlisting></informalexample>

    <para>
        We want to export the images that have the tags 'lazygal' OR 'hiking'.
    </para>
    <informalexample><programlisting>
        $ lazygal --filter-by-tag="(lazygal|hiking)"
    </programlisting></informalexample>

    <para>
        We want to export the images that have one of the tags 'hiking_2012', 'hiking_2013', 'hiking_France', etc.
    </para>

    <informalexample><programlisting>
        $ lazygal --filter-by-tag="hiking_.*"
    </programlisting></informalexample>

    <para>
        We want to export the images that have the tag 'lazygal', AND one of the tags 'hiking_2012', 'hiking_2013', 'hiking_France', etc.
    </para>

    <informalexample><programlisting>
        $ lazygal --filter-by-tag="lazygal,hiking_.*"
    </programlisting></informalexample>

  </refsect1>

888 889 890
  <refsect1>
    <title>SEE ALSO</title>

891 892
    <para>&lazygal-conf;.</para>

893
    <para>More information is available on the program website:
894
    <filename>https://sml.zincube.net/~niol/repositories.git/lazygal/about/</filename>.
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913
    </para>
  </refsect1>

  <refsect1>
    <title>AUTHOR</title>

    <para>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.
    </para>
	<para>
	  On Debian systems, the complete text of the GNU General Public
	  License can be found in /usr/share/common-licenses/GPL.
	</para>

  </refsect1>
</refentry>