diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b76fd6..a553b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 0.1.1 - 2026-07-12 + +- Synced the public LibreBible catalog snapshot after Phase 6 CrossWire/SWORD imports. +- Updated the `/librebible/` page to display translations and study helps without assuming every resource is a Bible translation. + ## 0.1.0 - 2026-07-12 - Phase 5 ChristIT.com catalog: added a public `/librebible/` page that reads a generated LibreBible catalog JSON snapshot and displays available Bible resources. diff --git a/VERSION b/VERSION index 6e8bf73..17e51c3 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/librebible/catalog/catalog.json b/librebible/catalog/catalog.json index 508b70b..11305b2 100644 --- a/librebible/catalog/catalog.json +++ b/librebible/catalog/catalog.json @@ -1,7 +1,7 @@ { "schema_version": "librebible.index-catalog.v1", "project": "LibreBible", - "generated_at": "2026-07-12T03:10:02.881Z", + "generated_at": "2026-07-12T04:31:19.179Z", "resources": [ { "id": "kjv-eng-kjv2006", @@ -180,6 +180,262 @@ "expected_sha256": "4ea6952590d070bfa22985aded48a49581e31b568a60aa09e25f73462e700e7d", "last_checked_at": "2026-07-12T02:18:30Z" } + }, + { + "id": "sword-jfb", + "resource_type": "commentary", + "title": "Jamieson Fausset Brown Bible Commentary", + "short_title": "Jamieson Fausset Brown Bible Commentary", + "abbreviation": "JFB", + "alternate_ids": [ + "JFB" + ], + "language": { + "code": "en", + "name": "English" + }, + "script": "Latn", + "canon": { + "scope": "KJV", + "notes": "Commentary entries are keyed to SWORD Bible references." + }, + "contributors": [ + { + "name": "Robert Jamieson, A. R. Fausset, and David Brown", + "role": "commentary authors" + }, + { + "name": "CrossWire Bible Society", + "role": "module provider" + } + ], + "features": [ + { + "id": "commentary-entries", + "type": "commentary", + "label": "Commentary entries", + "languages": [ + "eng" + ], + "embedded": true, + "package": "packages/json/sword-jfb/commentary.jsonl" + }, + { + "id": "sword-source", + "type": "source_format", + "label": "SWORD source", + "format": "OSIS", + "embedded": false + } + ], + "attachments": { + "included": [ + { + "id": "sword-jfb-commentary", + "resource_type": "commentary", + "label": "Commentary entries", + "relationship": "range-to-commentary", + "anchor_types": [ + "book", + "chapter", + "verse", + "verse_range" + ], + "languages": [ + "eng" + ], + "source": "CrossWire SWORD module export.", + "package": "packages/json/sword-jfb/commentary.jsonl" + } + ] + }, + "source": { + "provider": "CrossWire Bible Society", + "url": "https://crosswire.org/sword/modules/ModInfo.jsp?modName=JFB", + "download_url": "https://crosswire.org/ftpmirror/pub/sword/packages/rawzip/JFB.zip", + "format": "sword-rawzip", + "upstream_id": "JFB", + "upstream_last_updated": "2021-02-15", + "sword": { + "module_id": "JFB", + "conf_file": "mods.d/jfb.conf", + "mod_drv": "zCom4", + "source_type": "OSIS", + "versification": "KJV", + "version": "3.0", + "data_path": "./modules/comments/zcom/jfb/", + "text_source": "https://ccel.org/ccel/j/jamieson/jfb/cache/jfb.txt" + } + }, + "license": { + "name": "Public Domain", + "redistribution": true, + "commercial_use": true, + "share_alike": false, + "source_license_url": "https://crosswire.org/ftpmirror/pub/sword/raw/mods.d/jfb.conf", + "attribution": "Jamieson Fausset Brown Bible Commentary Text source: https://ccel.org/ccel/j/jamieson/jfb/cache/jfb.txt SWORD module: JFB Provided by CrossWire Bible Society.", + "jurisdiction_notes": "No jurisdiction-specific restriction was found in the SWORD module metadata.", + "restricted_notes": "Public-domain resources may be normalized and redistributed when the upstream module metadata has no extra restriction." + }, + "catalog_display": { + "primary_features": [ + "Commentary entries", + "Verse/range anchors", + "SWORD source" + ], + "summary": "Jamieson Fausset Brown Bible Commentary, imported from the CrossWire JFB SWORD module with 16945 commentary entries." + }, + "package_path": "packages/json/sword-jfb/catalog.json", + "source_manifest_path": "sources/sword-jfb.json", + "detail_doc_path": "docs/resources/sword-jfb.md", + "counts": { + "entries": 16945, + "commentary_entries": 16945 + }, + "files": { + "commentary_jsonl": { + "path": "commentary.jsonl", + "bytes": 32753867, + "sha256": "bf9e2cd40159e0e83f261652b2d4874d9450131575dc6c73d07dc568433a47d9" + }, + "source_rawzip": { + "path": "JFB.zip", + "bytes": 5687741, + "sha256": "a0b44ee84687cf0d8300ea4543cd375be42ab804902e72e448ea5f7d1c60b1bf" + } + }, + "checks": { + "expected_sha256": "a0b44ee84687cf0d8300ea4543cd375be42ab804902e72e448ea5f7d1c60b1bf", + "last_checked_at": "2026-07-12T04:31:19.021Z" + } + }, + { + "id": "sword-mhcc", + "resource_type": "commentary", + "title": "Matthew Henry's Concise Commentary on the Whole Bible", + "short_title": "Matthew Henry's Concise Commentary on the Whole Bible", + "abbreviation": "MHCC", + "alternate_ids": [ + "MHCC" + ], + "language": { + "code": "en", + "name": "English" + }, + "script": "Latn", + "canon": { + "scope": "KJV", + "notes": "Commentary entries are keyed to SWORD Bible references." + }, + "contributors": [ + { + "name": "Matthew Henry", + "role": "commentary author" + }, + { + "name": "CrossWire Bible Society", + "role": "module provider" + } + ], + "features": [ + { + "id": "commentary-entries", + "type": "commentary", + "label": "Commentary entries", + "languages": [ + "eng" + ], + "embedded": true, + "package": "packages/json/sword-mhcc/commentary.jsonl" + }, + { + "id": "sword-source", + "type": "source_format", + "label": "SWORD source", + "format": "OSIS", + "embedded": false + } + ], + "attachments": { + "included": [ + { + "id": "sword-mhcc-commentary", + "resource_type": "commentary", + "label": "Commentary entries", + "relationship": "range-to-commentary", + "anchor_types": [ + "book", + "chapter", + "verse", + "verse_range" + ], + "languages": [ + "eng" + ], + "source": "CrossWire SWORD module export.", + "package": "packages/json/sword-mhcc/commentary.jsonl" + } + ] + }, + "source": { + "provider": "CrossWire Bible Society", + "url": "https://crosswire.org/sword/modules/ModInfo.jsp?modName=MHCC", + "download_url": "https://crosswire.org/ftpmirror/pub/sword/packages/rawzip/MHCC.zip", + "format": "sword-rawzip", + "upstream_id": "MHCC", + "upstream_last_updated": "2021-02-14", + "sword": { + "module_id": "MHCC", + "conf_file": "mods.d/mhcc.conf", + "mod_drv": "zCom", + "source_type": "OSIS", + "versification": "KJV", + "version": "2.0", + "data_path": "./modules/comments/zcom/mhcc/", + "text_source": "https://ccel.org/ccel/h/henry/mhcc/cache/mhcc.txt" + } + }, + "license": { + "name": "Public Domain", + "redistribution": true, + "commercial_use": true, + "share_alike": false, + "source_license_url": "https://crosswire.org/ftpmirror/pub/sword/raw/mods.d/mhcc.conf", + "attribution": "Matthew Henry's Concise Commentary on the Whole Bible Text source: https://ccel.org/ccel/h/henry/mhcc/cache/mhcc.txt SWORD module: MHCC Provided by CrossWire Bible Society.", + "jurisdiction_notes": "No jurisdiction-specific restriction was found in the SWORD module metadata.", + "restricted_notes": "Public-domain resources may be normalized and redistributed when the upstream module metadata has no extra restriction." + }, + "catalog_display": { + "primary_features": [ + "Commentary entries", + "Verse/range anchors", + "SWORD source" + ], + "summary": "Matthew Henry's Concise Commentary on the Whole Bible, imported from the CrossWire MHCC SWORD module with 4059 commentary entries." + }, + "package_path": "packages/json/sword-mhcc/catalog.json", + "source_manifest_path": "sources/sword-mhcc.json", + "detail_doc_path": "docs/resources/sword-mhcc.md", + "counts": { + "entries": 4059, + "commentary_entries": 4059 + }, + "files": { + "commentary_jsonl": { + "path": "commentary.jsonl", + "bytes": 10830202, + "sha256": "a7765c9fcf9b72174606623d424ff8d6e08f3cfc18fe3c62e0d38fdf73d8a6ad" + }, + "source_rawzip": { + "path": "MHCC.zip", + "bytes": 1773039, + "sha256": "fc21726d9f5621c6168ed173442df2a973acad8d1d210ac1fa6c7ead7d3c5f30" + } + }, + "checks": { + "expected_sha256": "fc21726d9f5621c6168ed173442df2a973acad8d1d210ac1fa6c7ead7d3c5f30", + "last_checked_at": "2026-07-12T04:31:19.179Z" + } } ] } diff --git a/librebible/catalog/kjv-eng-kjv2006/catalog.json b/librebible/catalog/kjv-eng-kjv2006/catalog.json index fa9f5df..6665119 100644 --- a/librebible/catalog/kjv-eng-kjv2006/catalog.json +++ b/librebible/catalog/kjv-eng-kjv2006/catalog.json @@ -157,7 +157,7 @@ "name": "scripts/import-usfm.js", "version": "0.1.0" }, - "generated_at": "2026-07-12T03:10:02.881Z", + "generated_at": "2026-07-12T04:31:17.237Z", "source_sha256": "4ea6952590d070bfa22985aded48a49581e31b568a60aa09e25f73462e700e7d", "checks": { "expected_sha256": "4ea6952590d070bfa22985aded48a49581e31b568a60aa09e25f73462e700e7d", diff --git a/librebible/catalog/sword-jfb/catalog.json b/librebible/catalog/sword-jfb/catalog.json new file mode 100644 index 0000000..27d46c4 --- /dev/null +++ b/librebible/catalog/sword-jfb/catalog.json @@ -0,0 +1,146 @@ +{ + "schema_version": "librebible.resource-catalog.v1", + "project": "LibreBible", + "id": "sword-jfb", + "source_manifest_file": "sword-jfb.json", + "resource_type": "commentary", + "title": "Jamieson Fausset Brown Bible Commentary", + "short_title": "Jamieson Fausset Brown Bible Commentary", + "abbreviation": "JFB", + "alternate_ids": [ + "JFB" + ], + "language": { + "code": "en", + "name": "English" + }, + "script": "Latn", + "canon": { + "scope": "KJV", + "notes": "Commentary entries are keyed to SWORD Bible references." + }, + "contributors": [ + { + "name": "Robert Jamieson, A. R. Fausset, and David Brown", + "role": "commentary authors" + }, + { + "name": "CrossWire Bible Society", + "role": "module provider" + } + ], + "features": [ + { + "id": "commentary-entries", + "type": "commentary", + "label": "Commentary entries", + "languages": [ + "eng" + ], + "embedded": true, + "package": "packages/json/sword-jfb/commentary.jsonl" + }, + { + "id": "sword-source", + "type": "source_format", + "label": "SWORD source", + "format": "OSIS", + "embedded": false + } + ], + "attachments": { + "included": [ + { + "id": "sword-jfb-commentary", + "resource_type": "commentary", + "label": "Commentary entries", + "relationship": "range-to-commentary", + "anchor_types": [ + "book", + "chapter", + "verse", + "verse_range" + ], + "languages": [ + "eng" + ], + "source": "CrossWire SWORD module export.", + "package": "packages/json/sword-jfb/commentary.jsonl" + } + ] + }, + "source": { + "provider": "CrossWire Bible Society", + "url": "https://crosswire.org/sword/modules/ModInfo.jsp?modName=JFB", + "download_url": "https://crosswire.org/ftpmirror/pub/sword/packages/rawzip/JFB.zip", + "format": "sword-rawzip", + "upstream_id": "JFB", + "upstream_last_updated": "2021-02-15", + "sword": { + "module_id": "JFB", + "conf_file": "mods.d/jfb.conf", + "mod_drv": "zCom4", + "source_type": "OSIS", + "versification": "KJV", + "version": "3.0", + "data_path": "./modules/comments/zcom/jfb/", + "text_source": "https://ccel.org/ccel/j/jamieson/jfb/cache/jfb.txt" + } + }, + "license": { + "name": "Public Domain", + "redistribution": true, + "commercial_use": true, + "share_alike": false, + "source_license_url": "https://crosswire.org/ftpmirror/pub/sword/raw/mods.d/jfb.conf", + "attribution": "Jamieson Fausset Brown Bible Commentary Text source: https://ccel.org/ccel/j/jamieson/jfb/cache/jfb.txt SWORD module: JFB Provided by CrossWire Bible Society.", + "jurisdiction_notes": "No jurisdiction-specific restriction was found in the SWORD module metadata.", + "restricted_notes": "Public-domain resources may be normalized and redistributed when the upstream module metadata has no extra restriction." + }, + "catalog_display": { + "primary_features": [ + "Commentary entries", + "Verse/range anchors", + "SWORD source" + ], + "summary": "Jamieson Fausset Brown Bible Commentary, imported from the CrossWire JFB SWORD module with 16945 commentary entries." + }, + "importer": { + "name": "scripts/import-sword.js", + "version": "0.1.0", + "engine": "CrossWire SWORD mod2imp via Docker/Ubuntu libsword-utils" + }, + "generated_at": "2026-07-12T04:31:19.022Z", + "source_sha256": "a0b44ee84687cf0d8300ea4543cd375be42ab804902e72e448ea5f7d1c60b1bf", + "checks": { + "expected_sha256": "a0b44ee84687cf0d8300ea4543cd375be42ab804902e72e448ea5f7d1c60b1bf", + "last_checked_at": "2026-07-12T04:31:19.021Z" + }, + "counts": { + "entries": 16945, + "commentary_entries": 16945 + }, + "files": { + "commentary_jsonl": { + "path": "commentary.jsonl", + "bytes": 32753867, + "sha256": "bf9e2cd40159e0e83f261652b2d4874d9450131575dc6c73d07dc568433a47d9" + }, + "source_rawzip": { + "path": "JFB.zip", + "bytes": 5687741, + "sha256": "a0b44ee84687cf0d8300ea4543cd375be42ab804902e72e448ea5f7d1c60b1bf" + } + }, + "sword": { + "module_id": "JFB", + "conf_file": "mods.d/jfb.conf", + "mod_drv": "zCom4", + "source_type": "OSIS", + "versification": "KJV", + "version": "3.0", + "data_path": "./modules/comments/zcom/jfb/", + "text_source": "https://ccel.org/ccel/j/jamieson/jfb/cache/jfb.txt" + }, + "raw_conf_sha256": "8d494870d68cd92203441dc2dd264ba273087388b70d84b703782de346ef3f6f" +} diff --git a/librebible/catalog/sword-mhcc/catalog.json b/librebible/catalog/sword-mhcc/catalog.json new file mode 100644 index 0000000..45b5983 --- /dev/null +++ b/librebible/catalog/sword-mhcc/catalog.json @@ -0,0 +1,146 @@ +{ + "schema_version": "librebible.resource-catalog.v1", + "project": "LibreBible", + "id": "sword-mhcc", + "source_manifest_file": "sword-mhcc.json", + "resource_type": "commentary", + "title": "Matthew Henry's Concise Commentary on the Whole Bible", + "short_title": "Matthew Henry's Concise Commentary on the Whole Bible", + "abbreviation": "MHCC", + "alternate_ids": [ + "MHCC" + ], + "language": { + "code": "en", + "name": "English" + }, + "script": "Latn", + "canon": { + "scope": "KJV", + "notes": "Commentary entries are keyed to SWORD Bible references." + }, + "contributors": [ + { + "name": "Matthew Henry", + "role": "commentary author" + }, + { + "name": "CrossWire Bible Society", + "role": "module provider" + } + ], + "features": [ + { + "id": "commentary-entries", + "type": "commentary", + "label": "Commentary entries", + "languages": [ + "eng" + ], + "embedded": true, + "package": "packages/json/sword-mhcc/commentary.jsonl" + }, + { + "id": "sword-source", + "type": "source_format", + "label": "SWORD source", + "format": "OSIS", + "embedded": false + } + ], + "attachments": { + "included": [ + { + "id": "sword-mhcc-commentary", + "resource_type": "commentary", + "label": "Commentary entries", + "relationship": "range-to-commentary", + "anchor_types": [ + "book", + "chapter", + "verse", + "verse_range" + ], + "languages": [ + "eng" + ], + "source": "CrossWire SWORD module export.", + "package": "packages/json/sword-mhcc/commentary.jsonl" + } + ] + }, + "source": { + "provider": "CrossWire Bible Society", + "url": "https://crosswire.org/sword/modules/ModInfo.jsp?modName=MHCC", + "download_url": "https://crosswire.org/ftpmirror/pub/sword/packages/rawzip/MHCC.zip", + "format": "sword-rawzip", + "upstream_id": "MHCC", + "upstream_last_updated": "2021-02-14", + "sword": { + "module_id": "MHCC", + "conf_file": "mods.d/mhcc.conf", + "mod_drv": "zCom", + "source_type": "OSIS", + "versification": "KJV", + "version": "2.0", + "data_path": "./modules/comments/zcom/mhcc/", + "text_source": "https://ccel.org/ccel/h/henry/mhcc/cache/mhcc.txt" + } + }, + "license": { + "name": "Public Domain", + "redistribution": true, + "commercial_use": true, + "share_alike": false, + "source_license_url": "https://crosswire.org/ftpmirror/pub/sword/raw/mods.d/mhcc.conf", + "attribution": "Matthew Henry's Concise Commentary on the Whole Bible Text source: https://ccel.org/ccel/h/henry/mhcc/cache/mhcc.txt SWORD module: MHCC Provided by CrossWire Bible Society.", + "jurisdiction_notes": "No jurisdiction-specific restriction was found in the SWORD module metadata.", + "restricted_notes": "Public-domain resources may be normalized and redistributed when the upstream module metadata has no extra restriction." + }, + "catalog_display": { + "primary_features": [ + "Commentary entries", + "Verse/range anchors", + "SWORD source" + ], + "summary": "Matthew Henry's Concise Commentary on the Whole Bible, imported from the CrossWire MHCC SWORD module with 4059 commentary entries." + }, + "importer": { + "name": "scripts/import-sword.js", + "version": "0.1.0", + "engine": "CrossWire SWORD mod2imp via Docker/Ubuntu libsword-utils" + }, + "generated_at": "2026-07-12T04:31:19.179Z", + "source_sha256": "fc21726d9f5621c6168ed173442df2a973acad8d1d210ac1fa6c7ead7d3c5f30", + "checks": { + "expected_sha256": "fc21726d9f5621c6168ed173442df2a973acad8d1d210ac1fa6c7ead7d3c5f30", + "last_checked_at": "2026-07-12T04:31:19.179Z" + }, + "counts": { + "entries": 4059, + "commentary_entries": 4059 + }, + "files": { + "commentary_jsonl": { + "path": "commentary.jsonl", + "bytes": 10830202, + "sha256": "a7765c9fcf9b72174606623d424ff8d6e08f3cfc18fe3c62e0d38fdf73d8a6ad" + }, + "source_rawzip": { + "path": "MHCC.zip", + "bytes": 1773039, + "sha256": "fc21726d9f5621c6168ed173442df2a973acad8d1d210ac1fa6c7ead7d3c5f30" + } + }, + "sword": { + "module_id": "MHCC", + "conf_file": "mods.d/mhcc.conf", + "mod_drv": "zCom", + "source_type": "OSIS", + "versification": "KJV", + "version": "2.0", + "data_path": "./modules/comments/zcom/mhcc/", + "text_source": "https://ccel.org/ccel/h/henry/mhcc/cache/mhcc.txt" + }, + "raw_conf_sha256": "78d3df89bc6343d67e37a37b106904135a01e3ce15f2a157f9c090fe3eecc676" +} diff --git a/librebible/index.html b/librebible/index.html index e2eaabb..f80ccd7 100644 --- a/librebible/index.html +++ b/librebible/index.html @@ -4,7 +4,7 @@ LibreBible Catalog | Christ IT - + @@ -297,7 +297,7 @@
Public Bible resource catalog

LibreBible

-

A growing catalog of free-to-use Bible translations and attached study resources prepared for Libre Study, GracePress, and future Christ IT tools.

+

A growing catalog of free-to-use Bible translations, commentaries, dictionaries, and attached study resources prepared for Libre Study, GracePress, and future Christ IT tools.

Source Repository Catalog JSON @@ -309,9 +309,9 @@
Resources-
-
Translations-
+
Study Helps-
Verses-
-
Strong's Links-
+
Study Entries-
@@ -397,11 +397,15 @@ const badges = document.createElement("div"); badges.className = "badge-row"; badges.append( + makeBadge(iconForType(resource.resource_type), labelForType(resource.resource_type)), makeBadge("fa-solid fa-language", `${text(resource.language && resource.language.name)}${resource.language && resource.language.dialect ? " / " + resource.language.dialect : ""}`), - makeBadge("fa-solid fa-scale-balanced", text(resource.license && resource.license.name)), - makeBadge("fa-solid fa-book-open", text(resource.canon && resource.canon.scope)) + makeBadge("fa-solid fa-scale-balanced", text(resource.license && resource.license.name)) ); + if (resource.canon && resource.canon.scope && resource.resource_type === "translation") { + badges.append(makeBadge("fa-solid fa-book-open", text(resource.canon.scope))); + } + const features = document.createElement("div"); features.className = "feature-row"; const featureLabels = (resource.catalog_display && resource.catalog_display.primary_features) || (resource.features || []).map((feature) => feature.label); @@ -409,12 +413,7 @@ const details = document.createElement("div"); details.className = "detail-grid"; - details.append( - makeDetail("Translation", `${text(resource.translation && resource.translation.base_title)} (${text(resource.translation && resource.translation.translation_year)})`), - makeDetail("Edition", `${text(resource.translation && resource.translation.edition)}${resource.translation && resource.translation.edition_year ? " / " + resource.translation.edition_year : ""}`), - makeDetail("Source", `${text(resource.source && resource.source.provider)} / ${text(resource.source && resource.source.upstream_id)}`), - makeDetail("Counts", `${number(resource.counts && resource.counts.verses)} verses, ${number(resource.counts && resource.counts.strongs_links)} Strong's links`) - ); + details.append(...detailsForResource(resource)); card.append(head, summary, badges, features, details); return card; @@ -422,14 +421,17 @@ function renderCatalog(catalog) { const resources = Array.isArray(catalog.resources) ? catalog.resources : []; - const translations = resources.filter((resource) => resource.resource_type === "translation"); + const studyHelps = resources.filter((resource) => resource.resource_type !== "translation"); const verseTotal = resources.reduce((sum, resource) => sum + (resource.counts && Number(resource.counts.verses) || 0), 0); - const strongsTotal = resources.reduce((sum, resource) => sum + (resource.counts && Number(resource.counts.strongs_links) || 0), 0); + const entryTotal = resources.reduce((sum, resource) => { + const counts = resource.counts || {}; + return sum + (Number(counts.entries) || 0) + (Number(counts.strongs_links) || 0); + }, 0); document.getElementById("resource-count").textContent = number(resources.length); - document.getElementById("translation-count").textContent = number(translations.length); + document.getElementById("study-help-count").textContent = number(studyHelps.length); document.getElementById("verse-count").textContent = number(verseTotal); - document.getElementById("strongs-count").textContent = number(strongsTotal); + document.getElementById("entry-count").textContent = number(entryTotal); document.getElementById("catalog-status").textContent = `Generated ${text(catalog.generated_at)}`; const list = document.getElementById("resource-list"); @@ -443,6 +445,68 @@ } } + function labelForType(type) { + const labels = { + translation: "Translation", + commentary: "Commentary", + dictionary: "Dictionary", + lexicon: "Lexicon", + map: "Map", + cross_reference: "Cross references", + study_notes: "Study notes" + }; + return labels[type] || text(type, "Resource"); + } + + function iconForType(type) { + const icons = { + translation: "fa-solid fa-book-bible", + commentary: "fa-solid fa-book-open-reader", + dictionary: "fa-solid fa-spell-check", + lexicon: "fa-solid fa-language", + map: "fa-solid fa-map-location-dot", + cross_reference: "fa-solid fa-arrows-turn-to-dots", + study_notes: "fa-solid fa-note-sticky" + }; + return icons[type] || "fa-solid fa-cube"; + } + + function detailsForResource(resource) { + if (resource.resource_type === "translation") { + return [ + makeDetail("Translation", `${text(resource.translation && resource.translation.base_title)} (${text(resource.translation && resource.translation.translation_year)})`), + makeDetail("Edition", `${text(resource.translation && resource.translation.edition)}${resource.translation && resource.translation.edition_year ? " / " + resource.translation.edition_year : ""}`), + makeDetail("Source", `${text(resource.source && resource.source.provider)} / ${text(resource.source && resource.source.upstream_id)}`), + makeDetail("Counts", `${number(resource.counts && resource.counts.verses)} verses, ${number(resource.counts && resource.counts.strongs_links)} Strong's links`) + ]; + } + + if (resource.resource_type === "commentary") { + return [ + makeDetail("Resource Type", "Commentary"), + makeDetail("Entries", `${number(resource.counts && (resource.counts.commentary_entries || resource.counts.entries))} commentary entries`), + makeDetail("Source", `${text(resource.source && resource.source.provider)} / ${text(resource.source && resource.source.upstream_id)}`), + makeDetail("Anchors", "Book, chapter, verse, and verse range") + ]; + } + + if (resource.resource_type === "dictionary" || resource.resource_type === "lexicon") { + return [ + makeDetail("Resource Type", labelForType(resource.resource_type)), + makeDetail("Entries", `${number(resource.counts && (resource.counts.dictionary_entries || resource.counts.entries))} entries`), + makeDetail("Source", `${text(resource.source && resource.source.provider)} / ${text(resource.source && resource.source.upstream_id)}`), + makeDetail("Anchors", "Dictionary key, Strong's number, topic, or lemma") + ]; + } + + return [ + makeDetail("Resource Type", labelForType(resource.resource_type)), + makeDetail("Entries", `${number(resource.counts && resource.counts.entries)} entries`), + makeDetail("Source", `${text(resource.source && resource.source.provider)} / ${text(resource.source && resource.source.upstream_id)}`), + makeDetail("License", text(resource.license && resource.license.name)) + ]; + } + fetch(catalogUrl, { cache: "no-cache" }) .then((response) => { if (!response.ok) {