diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-18 08:30:05 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-18 08:30:05 +0300 |
| commit | 0213d6345866351b08b34a1991c2cc14a31f9349 (patch) | |
| tree | 1a32ba3e3dc4c4584c38c4788def6cc761591459 | |
| parent | 61890e0bd98262a55b3afff495ebfead33d76b96 (diff) | |
Default stats generation to off; release 0.10.00.10.0
The EXIF stats site (stats/ overview plus per-camera and filter mini-albums) was
generated by default. Flip the STATS_PAGE default to "no" so a plain album stays
lean; enable it explicitly with STATS_PAGE=yes or --stats. Updated the bundled
default config, the README ("off by default"), and the tests that relied on the
old default (the stats-rendering and dry-run-override tests now pass --stats /
set STATS_PAGE=yes; the print-config expectations now show STATS_PAGE=no).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
| -rw-r--r-- | Justfile | 2 | ||||
| -rw-r--r-- | README.md | 16 | ||||
| -rwxr-xr-x | bin/shuriken | 4 | ||||
| -rw-r--r-- | src/lib/config.source.sh | 2 | ||||
| -rw-r--r-- | src/shuriken.default.conf | 7 | ||||
| -rwxr-xr-x | tests/cli.sh | 16 |
6 files changed, 26 insertions, 21 deletions
@@ -1,7 +1,7 @@ set shell := ["bash", "-euo", "pipefail", "-c"] NAME := "shuriken" -VERSION := "0.9.0" +VERSION := "0.10.0" DESTDIR := env_var_or_default("DESTDIR", "") PREFIX := env_var_or_default("PREFIX", "/usr") BINDIR := env_var_or_default("BINDIR", PREFIX + "/bin") @@ -176,13 +176,13 @@ By default, the generated root `index.html` is a no-JavaScript splash page using a randomly selected album photo. Set `SPLASH_PAGE=no` or pass `--no-splash` to restore the top-level redirect to `page-1.html`. -By default, `shuriken` also generates a no-JavaScript stats site with -EXIF-derived insights (camera leaderboard, shooting dates, exposure, dimension, -format, and decoded-enum breakdowns), reachable from the `Stats` link in the page -header bar. Every row on the stats overview is clickable: each bucket (each -camera, ISO, year, aperture, orientation, …) is its own filter "mini-album" — a -gallery of just the matching photos with view pages whose previous/next cycle -within that filter. +`shuriken` can also generate a no-JavaScript stats site with EXIF-derived +insights (camera leaderboard, shooting dates, exposure, dimension, format, and +decoded-enum breakdowns), reachable from the `Stats` link in the page header bar. +This is off by default; set `STATS_PAGE=yes` or pass `--stats` to enable it. Every +row on the stats overview is clickable: each bucket (each camera, ISO, year, +aperture, orientation, …) is its own filter "mini-album" — a gallery of just the +matching photos with view pages whose previous/next cycle within that filter. To keep the album root uncluttered, all of this lives under a `stats/` subdirectory: the overview is `stats/index.html` and each mini-album is its own @@ -190,7 +190,7 @@ directory `stats/<filter>/` (gallery `index.html` plus numbered view pages). Onl the main album sits in `DIST_DIR` itself. The mini-album pages reuse the album's shared `photos/`, `thumbs/`, and `blurs/` assets (only the HTML is per-filter) and are rendered in parallel honouring `IMAGE_JOBS`. Set `STATS_PAGE=no` or pass -`--no-stats` to skip the whole `stats/` tree and hide the link. +`--no-stats` (the default) to skip the whole `stats/` tree and hide the link. To quickly pick a new random splash photo for an already generated album, run `shuriken --refresh-splash`. This rewrites only `DIST_DIR/index.html` using diff --git a/bin/shuriken b/bin/shuriken index e6ac7b2..67779b0 100755 --- a/bin/shuriken +++ b/bin/shuriken @@ -10,7 +10,7 @@ if (( BASH_VERSINFO[0] < 5 \ exit 1 fi -declare -r VERSION='0.9.0' +declare -r VERSION='0.10.0' declare -r DEFAULTRC="${SHURIKEN_DEFAULT_RC:-/etc/default/shuriken}" declare -r PACKAGED_TEMPLATE_DIR='/usr/share/shuriken/templates/default' declare -r PACKAGED_ASSET_DIR='/usr/share/shuriken/assets' @@ -4715,7 +4715,7 @@ apply_config_defaults() { # --source-url. The footer derives the displayed text from the URL itself. SOURCE_URL="${SOURCE_URL:-https://codeberg.org/snonux/shuriken.sh}" SPLASH_PAGE="${SPLASH_PAGE:-yes}" - STATS_PAGE="${STATS_PAGE:-yes}" + STATS_PAGE="${STATS_PAGE:-no}" SYNC_DELETE="${SYNC_DELETE:-yes}" TARBALL_INCLUDE="${TARBALL_INCLUDE:-no}" TARBALL_SUFFIX="${TARBALL_SUFFIX:-.tar}" diff --git a/src/lib/config.source.sh b/src/lib/config.source.sh index c3c0731..f07b48e 100644 --- a/src/lib/config.source.sh +++ b/src/lib/config.source.sh @@ -45,7 +45,7 @@ apply_config_defaults() { # --source-url. The footer derives the displayed text from the URL itself. SOURCE_URL="${SOURCE_URL:-https://codeberg.org/snonux/shuriken.sh}" SPLASH_PAGE="${SPLASH_PAGE:-yes}" - STATS_PAGE="${STATS_PAGE:-yes}" + STATS_PAGE="${STATS_PAGE:-no}" SYNC_DELETE="${SYNC_DELETE:-yes}" TARBALL_INCLUDE="${TARBALL_INCLUDE:-no}" TARBALL_SUFFIX="${TARBALL_SUFFIX:-.tar}" diff --git a/src/shuriken.default.conf b/src/shuriken.default.conf index 38d070e..6434dc0 100644 --- a/src/shuriken.default.conf +++ b/src/shuriken.default.conf @@ -15,9 +15,10 @@ IMAGEMAGICK_TIMEOUT=60 # SHUFFLE=yes # Generate a splash landing page at index.html. SPLASH_PAGE=yes -# Generate an EXIF stats page (stats.html) plus per-camera pages, and show the -# Stats navigation link in page headers. Can be yes or no. -STATS_PAGE=yes +# Generate an EXIF stats site (stats/ overview plus per-camera and filter +# mini-albums) and show the Stats navigation link in page headers. Can be yes or +# no. Off by default; set to yes (or pass --stats) to enable it. +STATS_PAGE=no # Set to any non-empty value for repeatable background, animation, timestamp, # and shuffled preview choices. # RANDOM_SEED=album-build-1 diff --git a/tests/cli.sh b/tests/cli.sh index adbfcf5..006967b 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -1417,7 +1417,7 @@ IMAGEMAGICK_TIMEOUT=60 RANDOM_SEED='' SHUFFLE=no SPLASH_PAGE=yes -STATS_PAGE=yes +STATS_PAGE=no TARBALL_INCLUDE=yes TARBALL_SUFFIX=.tar TAR_TIMEOUT=120 @@ -1466,7 +1466,7 @@ IMAGEMAGICK_TIMEOUT=60 RANDOM_SEED='' SHUFFLE=no SPLASH_PAGE=yes -STATS_PAGE=yes +STATS_PAGE=no TARBALL_INCLUDE=no TARBALL_SUFFIX=.tar TAR_TIMEOUT=120 @@ -1608,7 +1608,7 @@ IMAGEMAGICK_TIMEOUT=60 RANDOM_SEED='' SHUFFLE=yes SPLASH_PAGE=yes -STATS_PAGE=yes +STATS_PAGE=no TARBALL_INCLUDE=no TARBALL_SUFFIX=.tar TAR_TIMEOUT=120 @@ -1652,7 +1652,7 @@ IMAGEMAGICK_TIMEOUT=60 RANDOM_SEED='' SHUFFLE=no SPLASH_PAGE=yes -STATS_PAGE=yes +STATS_PAGE=no TARBALL_INCLUDE=no TARBALL_SUFFIX=.tar TAR_TIMEOUT=120 @@ -1721,7 +1721,7 @@ IMAGEMAGICK_TIMEOUT=60 RANDOM_SEED=cli-seed SHUFFLE=yes SPLASH_PAGE=no -STATS_PAGE=yes +STATS_PAGE=no TARBALL_INCLUDE=yes TARBALL_SUFFIX=.tar TAR_TIMEOUT=120 @@ -1936,6 +1936,7 @@ test_dry_run_reports_cli_overrides_without_writes() { --random-seed dry-seed \ --shuffle \ --no-splash \ + --stats \ --tarball ) @@ -3320,7 +3321,7 @@ test_generate_stats_pages_created_and_nav_linked() { cd "$TEST_TMPDIR" PATH="$fake_bin:$PATH" \ TEST_IMAGEMAGICK_IDENTIFY_OUTPUT="$(test::stats_identify_output)" \ - "$TEST_SHURIKEN" --generate --random-seed stats-seed + "$TEST_SHURIKEN" --generate --stats --random-seed stats-seed ) # Only the main album is in the dist root; all stats content is under stats/. @@ -4528,6 +4529,9 @@ THUMBHEIGHT=120 MAXPREVIEWS=40 ORIGINAL_BASEPATH='' TARBALL_INCLUDE=no +# Stats are off by default; this test renders the stats page, so enable them so +# the header bar includes the Stats nav link. +STATS_PAGE=yes SHURIKEN_OUTPUT_MODE=quiet apply_config_defaults |
