Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

mkgallery

Summarise a large photo collection — say, a year — as one static page: a title and a gallery of the most interesting pictures, picked automatically.

mkgallery ~/Photos/2025 --title "2025"

writes 2025.html and a 2025_assets/ directory next to it. Nothing in the source directory is touched, and no configuration is read from it.

Requirements

  • Python ≥ 3.10
  • exiftool on PATH
  • Formats: JPEG, PNG, WebP, TIFF and RAW (CR2, CR3, NEF, ARW, DNG)

Install

pipx install .        # or: hatch run mkgallery …

Usage

mkgallery SRC --title TITLE [options]
Option Default
-t, --title required Page title; also names TITLE.html / TITLE_assets/
-n, --count 48 Number of images shown
-o, --output-dir . Where to write the output (must not be inside SRC)
--order chronological chronological, or varied (neighbours are as dissimilar as possible)
--event-quota / --no-event-quota off Every event (a run of days with photos, gaps over 24 h split events) gets at least one image; the other slots are shared in proportion to the square root of the event size
--balance 1 0–1. Down-weights images in crowded regions when clustering: 0 treats every image alike, 1 gives sparse regions the same weight as dense ones
--cache-dir user cache dir Analysis cache (must not be inside SRC)
--no-cache Do not read or write the cache
-j, --jobs CPU count Parallel workers

How images are chosen

The selection is ported from mkmapdiary's front page:

  1. Each image is analysed from a small preview (for RAW files the embedded JPEG — nothing is developed at this stage): sharpness, contrast, entropy, perceptual and colour hashes. Results are cached by path, size and modification time.
  2. Near-duplicates (per day), unusually soft images and flat, low-entropy images are dropped.
  3. The rest is clustered by colour and capture time into --count groups; the sharpest, best-contrast image of each group is chosen. The picks therefore spread over the whole year and over different looks. With --event-quota (off by default) this is done per event, so a few photos from a small trip are not lost among thousands from a long holiday.
  4. Only the chosen images are converted (RAW files are developed here) into a thumbnail and a 1600 px version.

Credits and licences

mkgallery is licensed under the PolyForm Noncommercial License 1.0.0.

The generated page bundles these libraries (all MIT licensed). Their licence texts and copyright notices are shipped in TITLE_assets/lib/<name>/ and in src/mkgallery/vendor/:

The selection approach and metric code are adapted from mkmapdiary (same author).

Metadata

Release files for mkgallery 0.1.0rc2

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

Source distribution (sdist)

Source distribution for mkgallery 0.1.0rc2
File Size Uploaded Provenance Actions
mkgallery-0.1.0rc2.tar.gz 108.6 kB With provenance Details for mkgallery-0.1.0rc2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkgallery 0.1.0rc2
File Interpreter ABI Platform Actions
mkgallery-0.1.0rc2-py3-none-any.whl Python 3 none any Details for mkgallery-0.1.0rc2-py3-none-any.whl

Total release size: 188.1 kB

Release files / mkgallery-0.1.0rc2.tar.gz

Download URL mkgallery-0.1.0rc2.tar.gz
Size 108.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e783922d90b9574b8f8d73d85aa643f9efc0c843f64adc0b0841bc5ef8c8cdb4
BLAKE2b-256 checksum
How to use checksums
93fda9e4ad7909cf40393ec8d33ac8f1a710f664449596b98b7ece6eb5c6022b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Release files / mkgallery-0.1.0rc2-py3-none-any.whl

Download URL mkgallery-0.1.0rc2-py3-none-any.whl
Size 79.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf22972b0ce3ac14fbdac508b790a3da34f055b4bbc3e0626d55f269e70e3c84
BLAKE2b-256 checksum
How to use checksums
77f3720eae3a8a95daeb3a71dae4b30b4fb183a8b7e4e5f030ca71267140d312
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

Security for mkgallery 0.1.0rc2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mkgallery-0.1.0rc2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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