diff options
| -rw-r--r-- | .gitignore | 14 | ||||
| -rwxr-xr-x | scripts/snapshot-sources.sh | 20 | ||||
| -rw-r--r-- | sources/README.md | 15 | ||||
| -rw-r--r-- | sources/snapshot.tar.gz | bin | 0 -> 6417566 bytes |
4 files changed, 45 insertions, 4 deletions
@@ -10,3 +10,17 @@ scripts/.oracle-cache/ scripts/.wujek-cache/ sources/*.log sources/.*.log + +# extracted source snapshot (the committed archive is sources/snapshot.tar.gz; +# `tar xzf sources/snapshot.tar.gz -C sources` to unpack for regeneration) +sources/catholic-resources/ +sources/missalemeum/ +sources/litcal/ +sources/getbible/ + +# OS / editor cruft +.DS_Store +*~ +*.swp +.idea/ +.vscode/ diff --git a/scripts/snapshot-sources.sh b/scripts/snapshot-sources.sh index e9d6f63..4c8c56c 100755 --- a/scripts/snapshot-sources.sh +++ b/scripts/snapshot-sources.sh @@ -11,7 +11,9 @@ # span or add providers by editing the ranges below and re-running. # # Usage: sh scripts/snapshot-sources.sh [provider ...] -# providers: cr litcal getbible missalemeum (default: all) +# providers: cr litcal getbible missalemeum (default: all four) +# pack -- roll the fetched dirs into sources/snapshot.tar.gz (committed) +# unpack -- restore the per-provider dirs from sources/snapshot.tar.gz set -eu ROOT=$(cd "$(dirname "$0")/.." && pwd) @@ -95,6 +97,20 @@ snap_missalemeum() { done } +# The committed artifact is sources/snapshot.tar.gz (the raw per-provider dirs +# are git-ignored). `pack` rolls the fetched dirs into it; `unpack` restores +# them from it for a regeneration/audit run. +pack_archive() { + echo "packing sources/snapshot.tar.gz ..." + tar czf "$SNAP/snapshot.tar.gz" -C "$SNAP" catholic-resources missalemeum litcal getbible + echo " wrote $SNAP/snapshot.tar.gz ($(du -h "$SNAP/snapshot.tar.gz" | cut -f1))" +} +unpack_archive() { + echo "unpacking sources/snapshot.tar.gz ..." + tar xzf "$SNAP/snapshot.tar.gz" -C "$SNAP" + echo " extracted per-provider dirs into $SNAP/" +} + which=${*:-cr litcal getbible missalemeum} for p in $which; do case "$p" in @@ -102,6 +118,8 @@ for p in $which; do litcal) snap_litcal ;; getbible) snap_getbible ;; missalemeum) snap_missalemeum ;; + pack) pack_archive ;; + unpack) unpack_archive ;; *) echo "unknown provider: $p" >&2 ;; esac done diff --git a/sources/README.md b/sources/README.md index b177c3d..f746d29 100644 --- a/sources/README.md +++ b/sources/README.md @@ -7,9 +7,18 @@ re-audited offline** if those sites change, move, or disappear — the project's 25-year-longevity aim. Reading references are facts, not creative works; this is a provenance cache, not redistribution of anyone's edition. -Refresh or extend with `sh scripts/snapshot-sources.sh [provider ...]` -(idempotent: existing non-empty files are skipped). Every file is recorded in -`manifest.tsv` (path, url, sha256, bytes). First archived **2026-07-29**. +The data ships as a single compressed archive, **`sources/snapshot.tar.gz`** +(~6 MB); `manifest.tsv` (path, url, sha256, bytes) and this README stay +uncompressed for browsing. First archived **2026-07-29**. + +```sh +# unpack the archived data (into git-ignored per-provider dirs): +sh scripts/snapshot-sources.sh unpack # or: tar xzf sources/snapshot.tar.gz -C sources +# refresh/extend from the live sites (idempotent — skips files already present): +sh scripts/snapshot-sources.sh # all four providers +# re-roll the archive after refreshing: +sh scripts/snapshot-sources.sh pack # or: tar czf sources/snapshot.tar.gz -C sources <dirs> +``` ## What's here diff --git a/sources/snapshot.tar.gz b/sources/snapshot.tar.gz Binary files differnew file mode 100644 index 0000000..4cfa879 --- /dev/null +++ b/sources/snapshot.tar.gz |
