Skip to content

Commit 992dabb

Browse files
kckernclaude
andcommitted
data: seed early LDS editions, Tyndale, and public-version headings
Owner decisions #8 and #9. publicVersions adds TYN (original-spelling Tyndale), the 1830, 1837, 1840, 1841, 1879 and 1920 Book of Mormon editions, the 1833 Book of Commandments and the 1835 D&C. scripture_headings is now seeded, version-scoped so check-seeds rejects any non-public version in it. scripture_versions.desc is exported blank. Held back: GNV and WYC (modern-spelling editions in the database), scripture_references (not version-tied; LDS footnote xrefs and others of unconfirmed authorship), scripture_footnotes (study editions only). The stack workflow checks the new text and headings render. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent f30c050 commit 992dabb

8 files changed

Lines changed: 56 additions & 10 deletions

File tree

‎.github/workflows/stack.yml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ jobs:
2121
curl -fsS http://localhost:3000/health
2222
curl -fsS http://localhost:3000/kjv/John.3.16 | grep -q "For God so loved the world"
2323
curl -fsS http://localhost:3000/asv/gen.1.1 | grep -q "In the beginning God created"
24+
curl -fsS http://localhost:3000/tyn/gen.1.1 | grep -q "In the begynnynge God created"
25+
curl -fsS http://localhost:3000/1830/1-ne.1.1 | grep -q "having been born of goodly parents"
26+
curl -fsS http://localhost:3000/1833/boc.1.1 | grep -q "Harken, O ye people of my church"
27+
- name: Web serves seeded headings
28+
run: |
29+
curl -fsS http://localhost:3000/asv/ps.1.1 | grep -q "The righteous and the wicked contrasted"
30+
curl -fsS http://localhost:3000/1920/1-ne.1.1 | grep -q "Beginning of the record of Nephi"
2431
- name: Sphinx finds seeded verses
2532
run: |
2633
n=$(mysql -h127.0.0.1 -P9306 -N -e "SELECT COUNT(*) FROM sgindex WHERE MATCH('loved')")
278 Bytes
Binary file not shown.
3.77 MB
Binary file not shown.
32.7 KB
Binary file not shown.

‎data/seeds/SOURCE.md‎

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,42 @@
11
# Seed data
22

3-
Public seed data for local development, CI, and the `scripture-guide-seed` image. Licensed translations are never included; `scripts/seeds/check-seeds.mjs` (run in CI) rejects any version not listed in `manifest.json` `publicVersions`.
3+
Public seed data for local development, CI, and the `scripture-guide-seed` image. Licensed translations are never included; `scripts/seeds/check-seeds.mjs` (run in CI) rejects any version not listed in `manifest.json` `publicVersions`, in every version-scoped table (text, version metadata, headings).
44

55
| File | Rows | Contents | Basis |
66
|---|---|---|---|
77
| `schema.sql` | | DDL for the 13 tables the public site reads | Structure only |
88
| `01-lds_scriptures_volumes.sql.gz` | 17 | Volume names and counts | Structural |
99
| `02-lds_scriptures_books.sql.gz` | 167 | Book names, abbreviations, chapter/verse counts | Structural |
1010
| `03-lds_scriptures_verses.sql.gz` | 93,382 | Verse ID to book/chapter/verse map and labels. `verse_scripture` (LDS edition text) is exported blank | Structural |
11-
| `04-scripture_versions.sql.gz` | 3 | Version metadata for KJV, ASV, WEB | |
12-
| `05-scripture_verses.sql.gz` | 93,305 | Verse text: KJV (31,102), ASV (31,102), WEB (31,101) | KJV and ASV (1901): public domain in the US. WEB: dedicated to the public domain |
11+
| `04-scripture_versions.sql.gz` | 12 | Version metadata for the public versions below. `desc` is exported blank (the edition blurbs in the private database may be quoted from a modern source) | |
12+
| `05-scripture_verses.sql.gz` | 148,802 | Verse text, see the version table below | See below |
13+
| `06-scripture_headings.sql.gz` | 1,724 | Book titles, chapter headings, headnotes and chapter summaries of the public versions only | Printed with each public-domain edition |
1314

14-
Not seeded (authorship or license not yet confirmed): headings, cross-references, footnotes, facsimile index, word index, annotations.
15+
## Public versions
16+
17+
| Code | Version | Verses | Headings | Basis |
18+
|---|---|---|---|---|
19+
| `KJV` | King James Version | 31,102 | 66 | Public domain in the US |
20+
| `ASV` | American Standard Version (1901) | 31,102 | 218 | Public domain |
21+
| `WEB` | World English Bible | 31,101 | 66 | Dedicated to the public domain |
22+
| `TYN` | Tyndale Bible (original spelling) | 13,841 | 33 | 16th century; owner decision #8 |
23+
| `1830` | Book of Mormon, 1830 Palmyra edition | 6,604 | 156 | Owner decision #8 |
24+
| `1837` | Book of Mormon, 1837 Kirtland edition | 6,604 | 156 | Owner decision #8 |
25+
| `1840` | Book of Mormon, 1840 Nauvoo edition | 6,604 | 155 | Owner decision #8 |
26+
| `1841` | Book of Mormon, 1841 Liverpool edition | 6,604 | 156 | Owner decision #8 |
27+
| `1879` | Book of Mormon, 1879 edition (Orson Pratt) | 6,604 | 84 | Owner decision #8 |
28+
| `1920` | Book of Mormon, 1920 edition (James E. Talmage), with its chapter summaries | 6,604 | 297 | Published 1920, public domain in the US; owner decision #8 |
29+
| `1833` | Book of Commandments | 1,342 | 130 | Owner decision #8 |
30+
| `1835` | 1835 Doctrine and Covenants | 690 | 207 | Owner decision #8 |
31+
32+
Owner decision #8 (2026-10-22) judged these transcriptions free to publish. Decision #9 allows headings, cross-references and footnotes, but only those attached to a public version.
33+
34+
## Not seeded
35+
36+
- Versions `GNV` (1599 Geneva) and `WYC` (Wycliffe): the database text is a modern-spelling edition, not the original, so it is likely a copyrighted modernisation. Held for the owner.
37+
- `scripture_references` (cross-references): rows are keyed by verse id and not tied to a version. Sources: LDS edition footnote cross-references (`footnote`), JST and Pearl of Great Price parallels, Bible quotations and allusions in the Book of Mormon, and the 1835 D&C and Book of Commandments concordances. Authorship not confirmed.
38+
- `scripture_footnotes`: only rows for licensed or non-public study editions exist.
39+
- Facsimile index, word index, annotations.
1540

1641
Regenerate from a private copy of the database:
1742

‎data/seeds/manifest.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
2-
"publicVersions": ["KJV", "ASV", "WEB"],
2+
"publicVersions": ["KJV", "ASV", "WEB", "TYN", "1830", "1837", "1840", "1841", "1879", "1920", "1833", "1835"],
33
"tables": {
44
"lds_scriptures_volumes": { "scope": "all" },
55
"lds_scriptures_books": { "scope": "all" },
66
"lds_scriptures_verses": { "scope": "all", "blank": ["verse_scripture"] },
7-
"scripture_versions": { "scope": "version", "versionColumn": "id" },
8-
"scripture_verses": { "scope": "version", "versionColumn": "version" }
7+
"scripture_versions": { "scope": "version", "versionColumn": "id", "blank": ["desc"] },
8+
"scripture_verses": { "scope": "version", "versionColumn": "version" },
9+
"scripture_headings": { "scope": "version", "versionColumn": "version" }
910
}
1011
}

‎infra/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Local stack
22

3-
Runs scripture.guide on the public-domain seeds (KJV, ASV, WEB). No credentials or private data are needed.
3+
Runs scripture.guide on the public-domain seeds: KJV, ASV, WEB, Tyndale (`TYN`), the 1830, 1837, 1840, 1841, 1879 and 1920 Book of Mormon editions, the 1833 Book of Commandments and the 1835 Doctrine and Covenants, with their headings. No credentials or private data are needed.
44

55
```sh
66
docker compose -f infra/docker-compose.yml up -d --build # db + web on http://localhost:3000
@@ -14,9 +14,9 @@ docker compose -f infra/docker-compose.yml down -v # stop
1414
| `web` | `ghcr.io/kckern/scripture-guide` (built from `apps/web/Dockerfile`) | `127.0.0.1:3000` |
1515
| `sphinx` | `macbre/sphinxsearch:latest` (matches production) | Profile `search`. `sphinx.conf` is a shell script so credentials come from the environment at start-up |
1616

17-
Try `http://localhost:3000/kjv/John.3.16` or `http://localhost:3000/asv/gen.1.1`.
17+
Try `http://localhost:3000/kjv/John.3.16`, `http://localhost:3000/tyn/gen.1.1`, `http://localhost:3000/1830/1-ne.1` or `http://localhost:3000/1833/boc.1.1`.
1818

1919
## Known gaps
2020

2121
- The default version is `LDS`, whose text is not seeded, so unversioned URLs such as `/John.3.16` render an empty passage. Use a version prefix.
22-
- Headings, cross-references, footnotes, facsimiles, and annotations are not seeded (see `data/seeds/SOURCE.md`).
22+
- Cross-references, footnotes, facsimiles, and annotations are not seeded (see `data/seeds/SOURCE.md`).

‎scripts/seeds/check-seeds.test.mjs‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { test } from 'node:test';
22
import assert from 'node:assert/strict';
3+
import { readFileSync } from 'fs';
34
import { findViolations, versionsInSeed } from './check-seeds.mjs';
45

56
const manifest = { publicVersions: ['KJV'], tables: { scripture_verses: { scope: 'version', versionColumn: 'version' } } };
@@ -16,6 +17,18 @@ test('rejects a seed file for a table missing from the manifest', () => {
1617
assert.deepEqual(findViolations(manifest, { scripture_headings: [] }), ['scripture_headings: not in manifest']);
1718
});
1819

20+
test('the real manifest lists no licensed or held-back version', () => {
21+
const real = JSON.parse(readFileSync(new URL('../../data/seeds/manifest.json', import.meta.url), 'utf8'));
22+
// GNV and WYC in the private database are modern-spelling editions, held for the owner.
23+
const held = ['NIV', 'ESV', 'NRSV', 'NASB', 'NLT', 'NKJV', 'RSV', 'LDS', '1981', '2013', 'GNV', 'WYC', 'printer', 'EARLIEST'];
24+
assert.deepEqual(real.publicVersions.filter(v => held.includes(v)), []);
25+
});
26+
27+
test('every version-scoped table in the real manifest is checked against publicVersions', () => {
28+
const real = JSON.parse(readFileSync(new URL('../../data/seeds/manifest.json', import.meta.url), 'utf8'));
29+
for (const t of ['scripture_versions', 'scripture_verses', 'scripture_headings']) assert.equal(real.tables[t]?.scope, 'version', t);
30+
});
31+
1932
test('reads the leading version value of every row tuple', () => {
2033
const sql = "INSERT INTO `scripture_verses` (`version`,`id`) VALUES\n('KJV',1),\n('NIV',2);\nINSERT INTO `scripture_verses` (`version`,`id`) VALUES\n('KJV',3);\n";
2134
assert.deepEqual(versionsInSeed(sql).sort(), ['KJV', 'NIV']);

0 commit comments

Comments
 (0)