"Elementary Masonry Lightbox" photo gallery.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
dece da48104702
init
2 years ago
emlg init 2 years ago
.gitignore init 2 years ago
README.md init 2 years ago
gallery-gen.go init 2 years ago
pyproject.toml init 2 years ago
setup.cfg init 2 years ago

README.md

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