diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-28 18:01:33 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-07-28 18:01:33 +0200 |
| commit | 5e1664b8008675177a551aff1de371f54d4e20e4 (patch) | |
| tree | ffe405e1e2767890e473f75f474d2781af683f1b /internal/bible/embed_optional.go | |
| parent | f7344bb3de2885323a785bdc8d087bc034407fc4 (diff) | |
| download | lectio-5e1664b8008675177a551aff1de371f54d4e20e4.tar.gz lectio-5e1664b8008675177a551aff1de371f54d4e20e4.zip | |
bible: embed only the Vulgate by default; other corpora opt-in
Split the bundled corpora so the default binary carries only the
public-domain Latin Vulgate. wuj/drb/grb move to corpora_optional/ and are
compiled in only with `-tags fullbible`, or dropped into the user corpora
dir at runtime. This keeps the distributed AGPL binary free of third-party
scripture text -- bible corpora are not covered by lectio's licence.
- bible: read corpus files/metadata from core + optional embed FS
(embReadCorpus/embCorpusFiles); optionalFS is set only under the tag.
- config: default `versions` now reflects corpora actually available in the
build (Vulgate first), so a vul-only binary offers no absent versions.
- Makefile: `make build` = vul only; `make build-full` embeds the rest;
`make test` runs with -tags fullbible; check-corpora validates both dirs.
- tests: corpusmeta asserts on vul (the always-embedded corpus); the
versions-default expectation follows availableVersions().
Diffstat (limited to 'internal/bible/embed_optional.go')
| -rw-r--r-- | internal/bible/embed_optional.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/internal/bible/embed_optional.go b/internal/bible/embed_optional.go new file mode 100644 index 0000000..abe7b35 --- /dev/null +++ b/internal/bible/embed_optional.go @@ -0,0 +1,15 @@ +//go:build fullbible + +package bible + +import "embed" + +// Build with `-tags fullbible` to compile the optional corpora (wuj, drb, grb) +// into the binary alongside the always-embedded Vulgate. These translations are +// third-party scripture text and are NOT covered by lectio's AGPL licence; ship +// a fullbible binary only where redistributing those corpora is permitted. +// +//go:embed corpora_optional +var optionalEmbed embed.FS + +func init() { optionalFS = optionalEmbed } |
