Add KJV translator footnotes package

This commit is contained in:
2026-07-12 09:09:52 -05:00
parent 80a4ff7b37
commit a6ee513e02
14 changed files with 7122 additions and 16 deletions
+7 -1
View File
@@ -2,7 +2,13 @@
## Current
- Added Strong's dictionary reference material for KJV word links.
- Added KJV translator footnotes from the eBible USFM package.
## 0.1.7 - 2026-07-12
- Added KJV translator footnotes from the eBible USFM package as `footnotes.jsonl`.
- Added footnote catalog metadata, generated docs, package checksums, and footnote counts.
- Normalized common mojibake punctuation found in imported USFM notes.
## 0.1.6 - 2026-07-12
+1 -1
View File
@@ -6,5 +6,5 @@ This file is generated from source manifests and package catalogs. Edit `sources
| Resource | Type | Language | Date / Edition | Source | License | Features | Attachments | Counts | Detail |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| [King James (Authorized) Version](docs/resources/kjv-eng-kjv2006.md) | translation | English (eng) - archaic British | 1611; 1769 edition | eBible.org | Public Domain (redistributable) | Bible text, Strong's-linked words, USFM source, Strong's dictionary lookup | Strong's links, Strong's dictionary lookup, future: study_notes, future: commentary, future: cross_references, future: morphology, future: lemma_links, future: lexicon, future: dictionary, future: maps, future: timeline, future: media | 66 books, 31102 verses, 348884 Strong's links | [Details](docs/resources/kjv-eng-kjv2006.md) |
| [King James (Authorized) Version](docs/resources/kjv-eng-kjv2006.md) | translation | English (eng) - archaic British | 1611; 1769 edition | eBible.org | Public Domain (redistributable) | Bible text, Strong's-linked words, USFM source, Strong's dictionary lookup, Translator footnotes | Strong's links, Strong's dictionary lookup, Translator footnotes, future: study_notes, future: commentary, future: cross_references, future: morphology, future: lemma_links, future: lexicon, future: dictionary, future: maps, future: timeline, future: media | 66 books, 31102 verses, 348884 Strong's links, 6959 footnotes | [Details](docs/resources/kjv-eng-kjv2006.md) |
| [Strong's Hebrew and Greek Dictionaries](docs/resources/strongs-open-scriptures.md) | lexicon | English (eng) | n/a | Open Scriptures | CC-BY-SA digital edition; original Strong's dictionaries public domain (redistributable) | Strong's dictionary entries, Hebrew and Aramaic entries, Greek entries | Strong's number definitions, future: morphology, future: lemma_links | 14197 dictionary entries | [Details](docs/resources/strongs-open-scriptures.md) |
+6 -1
View File
@@ -1,6 +1,6 @@
# King James (Authorized) Version
Public-domain KJV package based on the 1769 standardized text, with Strong's numbers embedded in the source USFM.
Public-domain KJV package based on the 1769 standardized text, with Strong's numbers and translator footnotes embedded in the source USFM.
## Identity
@@ -51,12 +51,14 @@ Public-domain KJV package based on the 1769 standardized text, with Strong's num
- Strong's-linked words: concordance_links; languages: hebrew, aramaic, greek; systems: strongs; embedded; package: packages/json/kjv-eng-kjv2006/strongs-links.jsonl
- USFM source: source_format; format: usfm
- Strong's dictionary lookup: lexicon_lookup; languages: hebrew, aramaic, greek, eng; systems: strongs; package: packages/json/strongs-open-scriptures/entries.jsonl
- Translator footnotes: footnotes; languages: eng; embedded; package: packages/json/kjv-eng-kjv2006/footnotes.jsonl
## Attachments
Included:
- Strong's links: concordance_links; word-to-strongs; anchors: verse, word, strongs_number; languages: hebrew, aramaic, greek; systems: strongs; package: packages/json/kjv-eng-kjv2006/strongs-links.jsonl
- Strong's dictionary lookup: lexicon; strongs-number-to-definition; anchors: strongs_number, word; languages: hebrew, aramaic, greek, eng; systems: strongs; package: packages/json/strongs-open-scriptures/entries.jsonl
- Translator footnotes: footnotes; verse-to-footnote; anchors: verse; languages: eng; package: packages/json/kjv-eng-kjv2006/footnotes.jsonl
Supported future attachment types:
- study_notes
@@ -75,6 +77,7 @@ Supported future attachment types:
- Package catalog: packages/json/kjv-eng-kjv2006/catalog.json
- Verses JSONL: packages/json/kjv-eng-kjv2006/verses.jsonl
- Strong's links JSONL: packages/json/kjv-eng-kjv2006/strongs-links.jsonl
- Footnotes JSONL: packages/json/kjv-eng-kjv2006/footnotes.jsonl
- Entries JSONL: n/a
- Source SHA-256: 4ea6952590d070bfa22985aded48a49581e31b568a60aa09e25f73462e700e7d
- Last checked: 2026-07-12T02:18:30Z
@@ -84,6 +87,7 @@ Supported future attachment types:
- Books: 66
- Verses: 31102
- Strong's links: 348884
- Footnotes: 6959
- Entries: n/a
- Commentary entries: n/a
- Dictionary entries: n/a
@@ -92,3 +96,4 @@ Supported future attachment types:
- verses_jsonl: `verses.jsonl` (e3102f854a99c4788ed259ec61cb93fea830845c0788c8c0929bc77e9db6ca10)
- strongs_jsonl: `strongs-links.jsonl` (fa9702224776509275ea17fb245cb72150f1c262c4fbe44c7161e8e83866c779)
- footnotes_jsonl: `footnotes.jsonl` (a0ae3a83ffa82a9a8a7859cfed9488ea58233d81990d2557199a770fcfe688c2)
@@ -65,6 +65,7 @@ Supported future attachment types:
- Package catalog: packages/json/strongs-open-scriptures/catalog.json
- Verses JSONL: n/a
- Strong's links JSONL: n/a
- Footnotes JSONL: n/a
- Entries JSONL: packages/json/strongs-open-scriptures/entries.jsonl
- Source SHA-256: 04a2d6d0a13d75f17e562998bba7491beeed5a149909f904d12dd80aa1e47037
- Last checked: 2026-07-12T12:37:00Z
@@ -74,6 +75,7 @@ Supported future attachment types:
- Books: n/a
- Verses: n/a
- Strong's links: n/a
- Footnotes: n/a
- Entries: 14197
- Commentary entries: n/a
- Dictionary entries: 14197
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "libre-bible-data",
"version": "0.1.6",
"version": "0.1.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "libre-bible-data",
"version": "0.1.6",
"version": "0.1.7",
"dependencies": {
"adm-zip": "^0.5.16"
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "libre-bible-data",
"version": "0.1.6",
"version": "0.1.7",
"private": true,
"type": "module",
"scripts": {
+34 -3
View File
@@ -1,7 +1,7 @@
{
"schema_version": "librebible.index-catalog.v1",
"project": "LibreBible",
"generated_at": "2026-07-12T12:40:40.189Z",
"generated_at": "2026-07-12T14:08:30.649Z",
"resources": [
{
"id": "kjv-eng-kjv2006",
@@ -89,6 +89,16 @@
],
"embedded": false,
"package": "packages/json/strongs-open-scriptures/entries.jsonl"
},
{
"id": "translator-footnotes",
"type": "footnotes",
"label": "Translator footnotes",
"languages": [
"eng"
],
"embedded": true,
"package": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
}
],
"attachments": {
@@ -134,6 +144,20 @@
],
"source": "LibreBible resource strongs-open-scriptures.",
"package": "packages/json/strongs-open-scriptures/entries.jsonl"
},
{
"id": "kjv-eng-kjv2006-footnotes",
"resource_type": "footnotes",
"label": "Translator footnotes",
"relationship": "verse-to-footnote",
"anchor_types": [
"verse"
],
"languages": [
"eng"
],
"source": "Embedded in the eBible USFM package.",
"package": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
}
],
"supported_future_types": [
@@ -184,9 +208,10 @@
"primary_features": [
"Bible text",
"Strong's-linked words",
"Translator footnotes",
"USFM source"
],
"summary": "Public-domain KJV package based on the 1769 standardized text, with Strong's numbers embedded in the source USFM."
"summary": "Public-domain KJV package based on the 1769 standardized text, with Strong's numbers and translator footnotes embedded in the source USFM."
},
"package_path": "packages/json/kjv-eng-kjv2006/catalog.json",
"source_manifest_path": "sources/kjv-eng-kjv2006.json",
@@ -194,7 +219,8 @@
"counts": {
"books": 66,
"verses": 31102,
"strongs_links": 348884
"strongs_links": 348884,
"footnotes": 6959
},
"files": {
"verses_jsonl": {
@@ -206,6 +232,11 @@
"path": "strongs-links.jsonl",
"bytes": 62690394,
"sha256": "fa9702224776509275ea17fb245cb72150f1c262c4fbe44c7161e8e83866c779"
},
"footnotes_jsonl": {
"path": "footnotes.jsonl",
"bytes": 1371923,
"sha256": "a0ae3a83ffa82a9a8a7859cfed9488ea58233d81990d2557199a770fcfe688c2"
}
},
"checks": {
+34 -3
View File
@@ -86,6 +86,16 @@
],
"embedded": false,
"package": "packages/json/strongs-open-scriptures/entries.jsonl"
},
{
"id": "translator-footnotes",
"type": "footnotes",
"label": "Translator footnotes",
"languages": [
"eng"
],
"embedded": true,
"package": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
}
],
"attachments": {
@@ -131,6 +141,20 @@
],
"source": "LibreBible resource strongs-open-scriptures.",
"package": "packages/json/strongs-open-scriptures/entries.jsonl"
},
{
"id": "kjv-eng-kjv2006-footnotes",
"resource_type": "footnotes",
"label": "Translator footnotes",
"relationship": "verse-to-footnote",
"anchor_types": [
"verse"
],
"languages": [
"eng"
],
"source": "Embedded in the eBible USFM package.",
"package": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
}
],
"supported_future_types": [
@@ -181,15 +205,16 @@
"primary_features": [
"Bible text",
"Strong's-linked words",
"Translator footnotes",
"USFM source"
],
"summary": "Public-domain KJV package based on the 1769 standardized text, with Strong's numbers embedded in the source USFM."
"summary": "Public-domain KJV package based on the 1769 standardized text, with Strong's numbers and translator footnotes embedded in the source USFM."
},
"importer": {
"name": "scripts/import-usfm.js",
"version": "0.1.0"
},
"generated_at": "2026-07-12T12:40:38.744Z",
"generated_at": "2026-07-12T14:08:28.582Z",
"source_sha256": "4ea6952590d070bfa22985aded48a49581e31b568a60aa09e25f73462e700e7d",
"checks": {
"expected_sha256": "4ea6952590d070bfa22985aded48a49581e31b568a60aa09e25f73462e700e7d",
@@ -198,7 +223,8 @@
"counts": {
"books": 66,
"verses": 31102,
"strongs_links": 348884
"strongs_links": 348884,
"footnotes": 6959
},
"files": {
"verses_jsonl": {
@@ -210,6 +236,11 @@
"path": "strongs-links.jsonl",
"bytes": 62690394,
"sha256": "fa9702224776509275ea17fb245cb72150f1c262c4fbe44c7161e8e83866c779"
},
"footnotes_jsonl": {
"path": "footnotes.jsonl",
"bytes": 1371923,
"sha256": "a0ae3a83ffa82a9a8a7859cfed9488ea58233d81990d2557199a770fcfe688c2"
}
}
}
File diff suppressed because it is too large Load Diff
@@ -135,7 +135,7 @@
"version": "0.1.0"
},
"source_manifest_file": "strongs-open-scriptures.json",
"generated_at": "2026-07-12T12:40:40.189Z",
"generated_at": "2026-07-12T14:08:30.649Z",
"source_sha256": "04a2d6d0a13d75f17e562998bba7491beeed5a149909f904d12dd80aa1e47037",
"checks": {
"expected_sha256": "04a2d6d0a13d75f17e562998bba7491beeed5a149909f904d12dd80aa1e47037",
+3
View File
@@ -129,6 +129,7 @@ function resourceDetailMarkdown(manifest, packageCatalog) {
`- Package catalog: ${manifest.packages?.json_catalog ?? 'n/a'}`,
`- Verses JSONL: ${manifest.packages?.verses_jsonl ?? 'n/a'}`,
`- Strong\'s links JSONL: ${manifest.packages?.strongs_jsonl ?? 'n/a'}`,
`- Footnotes JSONL: ${manifest.packages?.footnotes_jsonl ?? 'n/a'}`,
`- Entries JSONL: ${manifest.packages?.entries_jsonl ?? 'n/a'}`,
`- Source SHA-256: ${packageCatalog?.source_sha256 ?? manifest.checks?.expected_sha256 ?? 'n/a'}`,
`- Last checked: ${manifest.checks?.last_checked_at ?? 'n/a'}`,
@@ -138,6 +139,7 @@ function resourceDetailMarkdown(manifest, packageCatalog) {
`- Books: ${packageCatalog?.counts?.books ?? 'n/a'}`,
`- Verses: ${packageCatalog?.counts?.verses ?? 'n/a'}`,
`- Strong\'s links: ${packageCatalog?.counts?.strongs_links ?? 'n/a'}`,
`- Footnotes: ${packageCatalog?.counts?.footnotes ?? 'n/a'}`,
`- Entries: ${packageCatalog?.counts?.entries ?? 'n/a'}`,
`- Commentary entries: ${packageCatalog?.counts?.commentary_entries ?? 'n/a'}`,
`- Dictionary entries: ${packageCatalog?.counts?.dictionary_entries ?? 'n/a'}`,
@@ -198,6 +200,7 @@ function countsLabel(packageCatalog) {
counts.books != null ? `${counts.books} books` : null,
counts.verses != null ? `${counts.verses} verses` : null,
counts.strongs_links != null ? `${counts.strongs_links} Strong's links` : null,
counts.footnotes != null ? `${counts.footnotes} footnotes` : null,
counts.commentary_entries != null ? `${counts.commentary_entries} commentary entries` : null,
counts.dictionary_entries != null ? `${counts.dictionary_entries} dictionary entries` : null,
counts.entries != null && counts.commentary_entries == null && counts.dictionary_entries == null ? `${counts.entries} entries` : null,
+45
View File
@@ -43,7 +43,9 @@ const usfmEntries = zip
const verses = []
const strongsLinks = []
const footnotes = []
let tokenId = 1
let footnoteId = 1
for (const entry of usfmEntries) {
const filePath = path.join(extractDir, entry.entryName)
@@ -68,6 +70,7 @@ for (const entry of usfmEntries) {
const raw = verseMatch[2]
const verseId = `${bookId}.${chapter}.${verseNumber}`
const links = [...raw.matchAll(/\\\+?w\s+([^|\\]+)\|strong="([^"]+)"\\\+?w\*/g)]
const notes = extractFootnotes(raw)
const text = cleanUsfmText(raw.replace(/\\\+?w\s+([^|\\]+)\|strong="([^"]+)"\\\+?w\*/g, '$1'))
verses.push({
@@ -95,6 +98,21 @@ for (const entry of usfmEntries) {
strong: normalizeStrong(link[2]),
})
}
for (const [index, note] of notes.entries()) {
footnotes.push({
id: footnoteId++,
verse_id: verseId,
translation_id: manifest.id,
book_id: bookId,
chapter,
verse: verseNumber,
note_index: index + 1,
caller: note.caller,
reference: note.reference || `${chapter}.${verseNumber}`,
text: note.text,
})
}
}
}
@@ -109,9 +127,15 @@ await writeFile(
`${strongsLinks.map((link) => JSON.stringify(link)).join('\n')}\n`,
'utf8',
)
await writeFile(
path.join(outputDir, 'footnotes.jsonl'),
`${footnotes.map((note) => JSON.stringify(note)).join('\n')}\n`,
'utf8',
)
const versesPackage = await packageFile(outputDir, 'verses.jsonl')
const strongsPackage = await packageFile(outputDir, 'strongs-links.jsonl')
const footnotesPackage = await packageFile(outputDir, 'footnotes.jsonl')
const catalog = {
schema_version: 'librebible.resource-catalog.v1',
@@ -140,10 +164,12 @@ const catalog = {
books: new Set(verses.map((verse) => verse.book_id)).size,
verses: verses.length,
strongs_links: strongsLinks.length,
footnotes: footnotes.length,
},
files: {
verses_jsonl: versesPackage,
strongs_jsonl: strongsPackage,
footnotes_jsonl: footnotesPackage,
},
}
@@ -182,6 +208,25 @@ await writeJson(path.join(root, 'packages', 'json', 'catalog.json'), {
console.log(`${manifest.id}: imported ${catalog.counts.verses} verses`)
console.log(`${manifest.id}: imported ${catalog.counts.strongs_links} Strong's links`)
console.log(`${manifest.id}: imported ${catalog.counts.footnotes} footnotes`)
function extractFootnotes(raw) {
return [...raw.matchAll(/\\f\s+([\s\S]*?)\\f\*/g)]
.map((match) => {
const content = match[1]
const caller = /^([+\w-]+)/.exec(content.trim())?.[1] ?? '+'
const reference = /\\fr\s+([^\\]+)/.exec(content)?.[1]?.trim() ?? ''
const textSource = content
.replace(/^([+\w-]+)/, '')
.replace(/\\fr\s+[^\\]+/, '')
return {
caller,
reference,
text: cleanUsfmText(textSource),
}
})
.filter((note) => note.text.length > 0)
}
async function packageFile(outputDir, fileName) {
const filePath = path.join(outputDir, fileName)
+5
View File
@@ -59,6 +59,11 @@ export function normalizeStrong(value) {
export function cleanUsfmText(input) {
return input
.replace(/…/g, '...')
.replace(/…/g, '...')
.replace(/’/g, "'")
.replace(/“/g, '"')
.replace(/”/g, '"')
.replace(/\\f [\s\S]*?\\f\*/g, '')
.replace(/\\x [\s\S]*?\\x\*/g, '')
.replace(/\\add\s+([^\\]+)\\add\*/g, '$1')
+22 -3
View File
@@ -67,6 +67,14 @@
"systems": ["strongs"],
"embedded": false,
"package": "packages/json/strongs-open-scriptures/entries.jsonl"
},
{
"id": "translator-footnotes",
"type": "footnotes",
"label": "Translator footnotes",
"languages": ["eng"],
"embedded": true,
"package": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
}
],
"attachments": {
@@ -92,6 +100,16 @@
"systems": ["strongs"],
"source": "LibreBible resource strongs-open-scriptures.",
"package": "packages/json/strongs-open-scriptures/entries.jsonl"
},
{
"id": "kjv-eng-kjv2006-footnotes",
"resource_type": "footnotes",
"label": "Translator footnotes",
"relationship": "verse-to-footnote",
"anchor_types": ["verse"],
"languages": ["eng"],
"source": "Embedded in the eBible USFM package.",
"package": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
}
],
"supported_future_types": [
@@ -147,10 +165,11 @@
"packages": {
"json_catalog": "packages/json/kjv-eng-kjv2006/catalog.json",
"verses_jsonl": "packages/json/kjv-eng-kjv2006/verses.jsonl",
"strongs_jsonl": "packages/json/kjv-eng-kjv2006/strongs-links.jsonl"
"strongs_jsonl": "packages/json/kjv-eng-kjv2006/strongs-links.jsonl",
"footnotes_jsonl": "packages/json/kjv-eng-kjv2006/footnotes.jsonl"
},
"catalog_display": {
"primary_features": ["Bible text", "Strong's-linked words", "USFM source"],
"summary": "Public-domain KJV package based on the 1769 standardized text, with Strong's numbers embedded in the source USFM."
"primary_features": ["Bible text", "Strong's-linked words", "Translator footnotes", "USFM source"],
"summary": "Public-domain KJV package based on the 1769 standardized text, with Strong's numbers and translator footnotes embedded in the source USFM."
}
}