diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-03 20:15:04 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-03 20:15:04 +0300 |
| commit | 2a22fa084a89494016bf92b6674eb5bd3ceefcfb (patch) | |
| tree | fba6114e2d7cb48eb2c8d74c8afa96c4a9296f6b /README.md | |
| parent | a9e9d2db616c4cb1a1fd192e38d53fba69b0102d (diff) | |
Add deterministic generation mode for task 3j0
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 19 |
1 files changed, 13 insertions, 6 deletions
@@ -47,7 +47,7 @@ missing, run `photoalbum --init` first. The config file is a Bash file with assignments such as `INCOMING_DIR`, `DIST_DIR`, `TEMPLATE_DIR`, `TITLE`, `HEIGHT`, `THUMBHEIGHT`, `MAXPREVIEWS`, -`SHUFFLE`, and `TARBALL_INCLUDE`. +`RANDOM_SEED`, `SHUFFLE`, and `TARBALL_INCLUDE`. Before generating, `photoalbum` validates the loaded config and command-line overrides. It checks required values, positive integer settings, `yes`/`no` @@ -66,11 +66,11 @@ 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`, `SHUFFLE`, `TARBALL_INCLUDE`, `TARBALL_SUFFIX`, -`TAR_OPTS`, and `ORIGINAL_BASEPATH`. Scalar values use Bash `%q` quoting and -`TAR_OPTS` is normalized to a Bash array assignment, so the output can be parsed -by shell tooling. `--quiet` does not suppress this output, and `--verbose` does -not add human-readable diagnostics to it. +`THUMBHEIGHT`, `MAXPREVIEWS`, `RANDOM_SEED`, `SHUFFLE`, `TARBALL_INCLUDE`, +`TARBALL_SUFFIX`, `TAR_OPTS`, and `ORIGINAL_BASEPATH`. Scalar values use Bash +`%q` quoting and `TAR_OPTS` is normalized to a Bash array assignment, so the +output can be parsed by shell tooling. `--quiet` does not suppress this output, +and `--verbose` does not add human-readable diagnostics to it. Successful generation writes `photoalbum.json` into the output directory. This metadata records the generator version and timestamp, config source, template @@ -88,11 +88,18 @@ The following long options override config values: | `--height VALUE` | `HEIGHT` | | `--thumbheight VALUE` | `THUMBHEIGHT` | | `--maxpreviews N` | `MAXPREVIEWS` | +| `--random-seed VALUE` | `RANDOM_SEED` | | `--shuffle` | `SHUFFLE=yes` | | `--no-shuffle` | `SHUFFLE=no` | | `--tarball` | `TARBALL_INCLUDE=yes` | | `--no-tarball` | `TARBALL_INCLUDE=no` | +By default, background photos, animation classes, generated timestamps, and +`--shuffle` preview order remain non-deterministic. Set `RANDOM_SEED` in the +config, or pass `--random-seed VALUE`, to make those choices repeatable for +stable tests or reproducible album builds. Use the same seed and inputs to +produce the same HTML. + `--dry-run` and `--print-config` accept the same override options as `--generate`. `--clean` accepts the same override options, but only `--dist` changes what it removes. |
