summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-06-03 20:15:04 +0300
committerPaul Buetow <paul@buetow.org>2026-06-03 20:15:04 +0300
commit2a22fa084a89494016bf92b6674eb5bd3ceefcfb (patch)
treefba6114e2d7cb48eb2c8d74c8afa96c4a9296f6b /README.md
parenta9e9d2db616c4cb1a1fd192e38d53fba69b0102d (diff)
Add deterministic generation mode for task 3j0
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 13 insertions, 6 deletions
diff --git a/README.md b/README.md
index 11acd58..3b0dc09 100644
--- a/README.md
+++ b/README.md
@@ -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.