Skip to main content

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

Project description

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

Copyright:

2007-2021 Jochen Kupperschmidt

License:

MIT, see LICENSE for details.

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.

  • Optimizes images to reduce size and remove metadata.

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 jpegoptim python-virtualenv

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

Install gallerize itself:

$ pip install -e .

Tests

Install test dependencies:

$ pip install -r requirements-test.txt

Run tests:

$ pytest

Usage

To 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

Changelog

Version 0.4

Released 2021-05-21

  • Added support for Python 3.7, 3.8, and 3.9. Removed support for versions older than that.

  • Added command line option --html-only to only regenerate HTML files. (contributed by Ryan Daniels)

  • Added command line option --optimize-images to optimize and strip metadata from images. (contributed by Ryan Daniels)

  • Added command line option --version to show version number.

  • Turned single module into package.

  • Added type hints.

  • Tweaked HTML and CSS.

  • Updated Jinja to 3.0.1 (from 2.11.3).

Version 0.3.2

Released 2015-08-09

  • Added support for Python 3.4.

  • A few tweaks here and there.

Version 0.3.1

Released 2013-10-03

  • Added support for Python 3 (3.3, actually).

  • Handle missing static path.

  • Improved documentation.

Version 0.3

  • Added README.

  • Added tests.

  • Added option to include image captions from text files.

  • Switched from XHTML to HTML5.

  • Tweaked template markup and styling. Added CSS transitions.

Version 0.2

Released 2010-04-02

  • Switched image processing from Python Imaging Library (PIL) to ImageMagick.

  • Switched template engine from Genshi to Jinja 2.

  • Merged formerly separate script to resize images into the main script.

  • Added option to only copy but not resize images.

  • Removed jQuery-based animation (because it became annoying).

Version 0.1

Released 2007-08-11

  • Initially released.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gallerize-0.4.tar.gz (12.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page