🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

gallerize

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gallerize

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

0.4
PyPI
Maintainers
1

========= gallerize

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

  • Python_ 3.7+
  • Jinja_
  • ImageMagick_ (tested with 6.6.9-7)
  • jpegoptim_ (tested with 1.4.6)

Installation

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

To install ImageMagick_, jpegoptim_, and virtualenv_ on Debian/Ubuntu:

.. code:: sh

$ 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:

.. code:: sh

$ virtualenv venv

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

.. code:: sh

$ . venv/bin/activate

Install the dependencies of this application:

.. code:: sh

$ pip install -r requirements.txt

Install gallerize itself:

.. code:: sh

$ pip install -e .

Tests

Install test dependencies:

.. code:: sh

$ pip install -r requirements-test.txt

Run tests:

.. code:: sh

$ pytest

Usage

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

.. code:: sh

$ gallerize output/ images/*

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

.. code:: sh

$ gallerize --help

.. _Python: http://www.python.org/ .. _ImageMagick: http://www.imagemagick.org/ .. _jpegoptim: https://github.com/tjko/jpegoptim .. _Jinja: http://jinja.pocoo.org/ .. _virtualenv: http://www.virtualenv.org/ .. _pip: http://www.pip-installer.org/

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.

Keywords

gallery

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts