Luca Saiu — Small, old, naïf or obsolete hacks [still incomplete]

The item currently in this directory, to be described, are:


make-gallery is a Bash script generating an image gallery using HTML, CSS and JavaScript, suitable to be published on a web page. Some public galleries generated by the script are published on this web site:

make-gallery requires Bash, the convert utility from ImageMagick and possibly the GNU flavour of some Unix utilities; I have only tested the script on GNU/Linux.

I wrote the script generalising some code I had initially intended to use only once for our wedding photos. Now I would describe make-gallery as suitable for distribution: it is rather flexible and supports GNU-style command-line options, including --version and --help; there is no other documentation, except for the post in which I announced make-gallery on my blog, An ag(e)ing hacker.

Copyright © Luca Saiu 2022
Copyright © p≡p Foundation 2022
Written by Luca Saiu.
make-gallery is free software; released under the GNU General Public Licence version 3 or later; however the generated HTML, CSS and JavaScript code is in the public domain.

make-gallery --help currently displays:

make-gallery/make-gallery -o OUTPUTDIRECTORY [option...] [INPUTFILE...]
Generate an HTML image gallery suitable for web pages.

Common GNU-style options:
  -?, --help                        give this help list;
      --usage                       give a short usage message;
  -V, --version                     print program version.

Debugging or interaction options
      --verbose                     be verbose while processing
      --no-verbose                  do not be verbose (default)

Output options
  -o, --output,
      --output-directory DIRECTORY set the output directory (mandatory option).
  -t, --title TITLE                set the gallery name
  -l, --language CC                specify a two-letter language code
  +t, --no-tar                     do not make a tar archive (default)
  -T, --tar                        make a tar archive
      --summary                    generate a summary at the end of the main
      --no-summary                 omit the summary at the end of the main
                                   page (default)
      --date                       show the gallery generation date on the main
                                   page (default)
      --no-date                    omit generation date from the main page
      --favicon URLORPATH          specify a favicon (none by default)
      --css URLORPATH              specify a CSS file or URL, to take
                                   precedence over the default (none by default)
      --no-css                     do not use a custom CSS (default)
      --main-page-credits          show make-gallery credits on the main page
      --no-main-page-credits       omit main-page make-gallery credits
      --every-image-credits        include make-gallery credits on every image
      --no-every-image-credits     omit make-gallery credits from every image
                                   page (default)

User HTML to include in generated pages as given.
      --main-page-top-html HTML    HTML to be included literally, inside a
                                   paragraph, at the beginning of the main page
      --main-page-bottom-html HTML Like above at the end of the main page
      --image-top-html HTML        Like above at the beginning of image pages
      --image-bottom-html HTML     Like above at the end of image pages
      --top-html HTML              Like above at the beginning of every page
      --bottom-html HTML           Like above at the end of every page
      --exit-html HTML             Like above near the end of every pages; this
                                   is meant to contain a link to some page "out"
                                   of the gallery

Scaling options
      --thumb-size SIZE            linear size of thumbnails in pixels
                                   (default: 150)
      --image-size SIZE            linear size of images (default: unscaled)

Input options
      --inputs FILENAME            read other inputs from the given file,
                                   one per line.  Can be used more than once.
                                   If FILENAME is - read from stdin.

Synonymous options, be they long or short, have the same arguments; option
arguments, when supported, are always mandatory.  Option arguments must be
separated from options with whitespace, and not with equal signs.
For example: --output-directory /tmp/foo
             --output /tmp/foo
             -o /tmp/foo
but not:
When multiple options conflict the last one on the command line takes

make-gallery home page:
For reporting bugs:

The make-gallery source code is available as a git repository:

[hacker emblem]
Luca Saiu
Last modified: 2022-12-04

Copyright © 2022 Luca Saiu
Verbatim copying and redistribution of this entire page are permitted provided this notice is preserved.