"Elementary Masonry Lightbox" photo gallery.
This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2022-05-17 18:43:32 +02:00
emlg init 2022-05-17 18:43:32 +02:00
.gitignore init 2022-05-17 18:43:32 +02:00
gallery-gen.go init 2022-05-17 18:43:32 +02:00
pyproject.toml init 2022-05-17 18:43:32 +02:00
README.md init 2022-05-17 18:43:32 +02:00
setup.cfg init 2022-05-17 18:43:32 +02:00

EmlGallery

EmlGallery (Elementary Masonry & Lightbox Gallery) is a simple generator for Web galleries, based on Masonry, a library that beautifully tiles images on a page, and Lightbox, a library for presenting individual images nicely.

The Go source is a prototype I did a few years ago and kept here because it's fun to me that I used Go at some point!

License WTFPLv2.

Usage

Point the script to a folder with photos and it generates a JSON file with metadata and an index.html file to visit, push everything to a Web host and you are ready to go.

emlg "/home/dece/Photos/2022 dubious trip to antartica"
ls $!
# → data.json  index.html  IMG1.jpg  IMG2.jpg  IMG3.jpg  …

As it relies on external libraries to work, you have to provide your own path to the different libraries, either a relative path on your computer or server, or an URL to some CDN. See the optional arguments below for the argument names.

positional arguments:
  dir                   directory with the photos

optional arguments:
  -h, --help            show this help message and exit
  --title TITLE         page title
  --jquery JQUERY       Web path to JQuery library
  --masonry MASONRY     Web path to Masonry library
  --imagesloaded IMAGESLOADED
                        Web path to ImagesLoaded library
  --lightbox LIGHTBOX   Web path to Lightbox2 library
  --lightbox-css LIGHTBOX_CSS
                        Web path to Lightbox2 CSS