Skip to main content

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.0

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.0
File Size Uploaded Provenance Actions
mkgallery-0.1.0.tar.gz 108.7 kB With provenance Details for mkgallery-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 188.2 kB

Release files / mkgallery-0.1.0.tar.gz

Download URL mkgallery-0.1.0.tar.gz
Size 108.7 kB
Tags Source
SHA-256 checksum
How to use checksums
1d6d04d8b01f146783e4e5303515c7b6c704b53402e5a0bb79458df6488b4bc4
BLAKE2b-256 checksum
How to use checksums
c2747c67bf6673591d529e27cd66bd20d629ef457dfc181f93c0c3034193b62f
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.0-py3-none-any.whl

Download URL mkgallery-0.1.0-py3-none-any.whl
Size 79.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f90ff04533b9293d84bf6d461fc7e331a840a8d871a6f3d0ec0969dc2cd3ace
BLAKE2b-256 checksum
How to use checksums
04a555077162a5bd631032321a8cd8749ebb758133bfac1ffb3d1b95e97f2c6a
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.0

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.0.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