Skip to content

Create a static HTML/CSS image gallery from a bunch of images.

License

Notifications You must be signed in to change notification settings

ryandaniels/gallerize

 
 

Repository files navigation

gallerize

Create a static HTML/CSS image gallery from a bunch of images. Can use fancybox (similar to lightbox) jQuery effect.

Features

  • Integrates ImageMagick to resize images and create thumbnails.
  • Generates clean, slim, semantically appropriate HTML5 and uses CSS 3 for styling. As a result, the output can easily be themed.
  • Provides HTML access keys for keyboard navigation.
  • Can use fancybox (similar to lightbox) jQuery effect.
  • Optimize image to reduce size and remove meta info.

Requirements

Installation

It is recommended to create a virtual environment and run gallerize inside it.

To install ImageMagick, jpegoptim, and virtualenv on Debian/Ubuntu:

$ aptitude install imagemagick python-virtualenv jpegoptim

This should also give you a copy of pip.

Create a virtual environment called venv in the application path:

$ virtualenv venv

Activate it (note the space after the first dot!):

$ . venv/bin/activate

Install the dependencies of this application:

$ pip install -r requirements.txt

Tests

Run with py.test

Install pytest as test runner:

$ pip install pytest

Run tests:

$ py.test test_gallerize.py

Run with tox

To easily run tests in different Python interpreters, use tox:

$ pip install tox
$ tox

And to test against a single, specific Python interpreter (version 3.4, in this case):

$ tox -e py34

Usage

To create a gallery in the directory output from a all images in the directory images:

$ ./gallerize.py output/ images/*

See the usage help for more information on specifying a gallery title, image captions, and image dimensions:

$ ./gallerize.py --help

Credits / Thanks

Name:Original Gallerize
Link:https://github.com/homeworkprod/gallerize
Copyright:2007-2015 Jochen Kupperschmidt
License:MIT, see LICENSE for details.
Version:0.3.2
Date:09-Aug-2015

Name:Fancybox v3
Link:https://fancyapps.com/fancybox/3/
Copyright:fancybox is licensed under the GPLv3 license for all open source applications.

Packages

No packages published

Languages

  • Python 65.1%
  • HTML 21.9%
  • CSS 13.0%