Skip to main content

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.

Release files for gallerize 0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gallerize 0.4
File Size Uploaded
gallerize-0.4.tar.gz 12.4 kB Details

Release files / gallerize-0.4.tar.gz

Download URL gallerize-0.4.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
bf401037eccf098a5c04981a9ad2f56a0007794aede12e7188b96ec2f8fa7d07
BLAKE2b-256 checksum
How to use checksums
2008c2137360d721316809ed6c29a94d4eaf7a348437f69222b654d723b754bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.7.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.4 This release

1 release file

0.3.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page