Generate a static HTML gallery from a directory tree of images
2.6K

gallerygen generates a static HTML gallery from a directory of images.
Preview: dropbox.dzombak.com/gifs
gallerygen [OPTIONS] --dir /path/to/images
Generates a static HTML gallery from the specified directory of images. The gallery includes:
-dir string: Directory containing images to process. Required.-oneshot: Generate gallery once and exit, without watching for changes.-title string: Title to use for the gallery. (default dropbox.dzombak.com/gifs)-version: Print version and exit.brew install cdzombak/oss/gallerygen
Install my Debian repository if you haven't already:
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://dist.cdzombak.net/deb.key | sudo gpg --dearmor -o /etc/apt/keyrings/dist-cdzombak-net.gpg
sudo chmod 0644 /etc/apt/keyrings/dist-cdzombak-net.gpg
echo -e "deb [signed-by=/etc/apt/keyrings/dist-cdzombak-net.gpg] https://dist.cdzombak.net/deb/oss any oss\n" | sudo tee -a /etc/apt/sources.list.d/dist-cdzombak-net.list > /dev/null
sudo apt-get update
Then install gallerygen via apt-get:
sudo apt-get install gallerygen
Pre-built binaries for Linux and macOS on various architectures are downloadable from each GitHub Release. Debian packages for each release are available as well.
git clone https://github.com/cdzombak/gallerygen.git
cd gallerygen
make build
cp out/gallerygen $INSTALL_DIR
Docker images are available for a variety of Linux architectures from Docker Hub and GHCR. Images are based on the scratch image and are as small as possible.
Run them via:
docker run --rm -v /path/to/images:/images cdzombak/gallerygen:1 -dir /images
docker run --rm -v /path/to/images:/images ghcr.io/cdzombak/gallerygen:1 -dir /images -title "My Gallery"
Note that when using Docker, you must map the image directory into the container.
LGPLv3; see LICENSE in this repository.
Content type
Image
Digest
sha256:46d3d7dbe…
Size
3.3 MB
Last updated
6 months ago
docker pull cdzombak/gallerygen