diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-14 23:07:12 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-14 23:07:12 +0300 |
| commit | b7d5c1102c3679b67532f30f2613e4d2d61c59ba (patch) | |
| tree | 573548dc8762aeb7c642fed804894d280425f84c /README.md | |
| parent | 0f0662850ad2df3502241cd1bdfcb366dd68d717 (diff) | |
rm0 wire stats feature into generate with STATS_PAGE toggle
Final integration of the stats-site feature:
- Add STATS_PAGE config (default yes) mirroring SPLASH_PAGE through every
layer: shuriken.default.conf, apply_config_defaults, CLI_OPTION_SPEC
(--stats/--no-stats), the CLI_CONFIG_OVERRIDE_TARGETS allowlist (without
which the flag was silently ignored), usage text, yes/no validation,
print_config, the action config list + effective-setting log, the
generation metadata, and the dry-run plan.
- generate() now calls a gated generate_stats_pages helper after the album
pages (and before archiving, so the stats/camera pages are tarballed):
collect_photo_exif_stats + render_stats_page . . + render_camera_pages . .
- Emit "stats_page" in shuriken.json next to "splash_page".
- Gate the header Stats nav link behind STATS_PAGE via a new
render_stats_page_html config_html field, so it is hidden (no 404) when
stats are disabled.
- Document STATS_PAGE and --stats/--no-stats in the README.
- Tests: full --generate produces stats.html + camera-<slug>.html + the nav
link and stats_page=true; --no-stats suppresses all three and sets
stats_page=false; print-config and metadata expectations updated.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -76,7 +76,8 @@ If the file is missing, run `shuriken --init` first. The config file is a Bash file with assignments such as `INCOMING_DIR`, `DIST_DIR`, `TEMPLATE_DIR`, `TITLE`, `HEIGHT`, `THUMBHEIGHT`, `MAXPREVIEWS`, `IMAGE_JOBS`, `IMAGEMAGICK_TIMEOUT`, `RANDOM_SEED`, `SHUFFLE`, `SPLASH_PAGE`, -`TARBALL_INCLUDE`, `TAR_TIMEOUT`, `SYNC_DELETE`, and `SYNC_DESTINATIONS`. +`STATS_PAGE`, `TARBALL_INCLUDE`, `TAR_TIMEOUT`, `SYNC_DELETE`, and +`SYNC_DESTINATIONS`. Before generating, `shuriken` validates the loaded config and command-line overrides. It checks required values, positive integer settings, `yes`/`no` @@ -96,7 +97,7 @@ tarball filename uses `<timestamp>` as a placeholder so the output is stable. `--print-config` writes stable shell-style assignments to stdout in this order: `CONFIG_SOURCE`, `INCOMING_DIR`, `DIST_DIR`, `TEMPLATE_DIR`, `TITLE`, `HEIGHT`, `THUMBHEIGHT`, `MAXPREVIEWS`, `IMAGE_JOBS`, `IMAGEMAGICK_TIMEOUT`, -`RANDOM_SEED`, `SHUFFLE`, `SPLASH_PAGE`, `TARBALL_INCLUDE`, +`RANDOM_SEED`, `SHUFFLE`, `SPLASH_PAGE`, `STATS_PAGE`, `TARBALL_INCLUDE`, `TARBALL_SUFFIX`, `TAR_TIMEOUT`, `TAR_OPTS`, `SYNC_DELETE`, `SYNC_DESTINATIONS`, and `ORIGINAL_BASEPATH`. Scalar values use Bash `%q` quoting and `TAR_OPTS` and `SYNC_DESTINATIONS` are normalized to Bash array @@ -135,6 +136,8 @@ The following long options override config values: | `--no-shuffle` | `SHUFFLE=no` | | `--splash` | `SPLASH_PAGE=yes` | | `--no-splash` | `SPLASH_PAGE=no` | +| `--stats` | `STATS_PAGE=yes` | +| `--no-stats` | `STATS_PAGE=no` | | `--tarball` | `TARBALL_INCLUDE=yes` | | `--no-tarball` | `TARBALL_INCLUDE=no` | | `--sync-delete` | `SYNC_DELETE=yes` | @@ -147,6 +150,12 @@ 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 `stats.html`, a no-JavaScript page with +EXIF-derived insights (camera leaderboard, shooting dates, exposure, dimension, +and format breakdowns) plus one `camera-<slug>.html` per camera linked from the +leaderboard, and shows a `Stats` link in the page header bar. Set `STATS_PAGE=no` +or pass `--no-stats` to skip the stats and per-camera pages 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 the existing `photos` and `blurs` output, so it avoids reprocessing images and |
