Create a static HTML/CSS image gallery from a bunch of images.
| Copyright: | 2007-2021 Jochen Kupperschmidt |
|---|---|
| License: | MIT, see LICENSE for details. |
- 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.
- Optimizes images to reduce size and remove metadata.
- Python 3.7+
- Jinja
- ImageMagick (tested with 6.6.9-7)
- jpegoptim (tested with 1.4.6)
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 jpegoptim python-virtualenvThis should also give you a copy of pip.
Create a virtual environment called venv in the application path:
$ virtualenv venvActivate it (note the space after the first dot!):
$ . venv/bin/activateInstall the dependencies of this application:
$ pip install -r requirements.txtInstall gallerize itself:
$ pip install -e .Install test dependencies:
$ pip install -r requirements-test.txtRun tests:
$ pytestTo create a gallery in the directory output from a all images in the directory images:
$ gallerize output/ images/*See the usage help for more information on specifying a gallery title, image captions, image dimensions, and more:
$ gallerize --help