Skip to content

Add Theographic biblical entity data (people, places, events, groups) - #64

Open
VictorUvarov wants to merge 1 commit into
HelloAOLab:mainfrom
VictorUvarov:theographic-entities
Open

Add Theographic biblical entity data (people, places, events, groups)#64
VictorUvarov wants to merge 1 commit into
HelloAOLab:mainfrom
VictorUvarov:theographic-entities

Conversation

@VictorUvarov

@VictorUvarov VictorUvarov commented Aug 30, 2026

Copy link
Copy Markdown

Initial work for Bible API

Exposes the Theographic Bible Metadata dataset (people, places, events, and people groups plus their relationships) through the existing dataset abstraction at /api/d/theographic/.

What's included

  • New import-bible-metadata <dir> CLI command that converts the raw Theographic JSON (already downloaded by the existing fetch-bible-metadata command) into a dataset with four entity collections: 3,067 people, 1,274 places, 450 events, 23 people groups.
  • New DatasetEntity table (datasetId, type, id, name, json, sha256) following the CommentaryProfile json-blob pattern, with a migration.
  • Generated API endpoints under /api/d/theographic/: people.json, people/{id}.json, and the same list/detail pairs for places, events, and groups. available_datasets.json gains entity list links and totals.
  • SDK methods in free-use-bible-api (getDatasetPeople, getDatasetPerson, plus the place/event/group pairs), regenerated types, OpenAPI paths, and reference docs.

Entities reference Bible passages as {book, chapter, verse, endVerse?} using USFM book IDs (mapped from Theographic's OSIS IDs). Cross-entity references carry {id, name, apiLink}. All relationships (family, birth/death places, event participants/locations, group membership, event ordering) come from the source data; none are invented. IDs are stable slugs (e.g. paul_2479, jerusalem_636, saul-is-converted_326, tribe-of-benjamin).

Bug fixes

  • Fix fetch-bible-metadata 404 when downloading periods.json
  • downloadFile() now throws on non-OK HTTP responses instead of writing the error page to disk.

Usage

helloao fetch-bible-metadata ./sources/metadata
helloao import-bible-metadata ./sources/metadata --db ./free-use-bible-api.db
helloao upload-api-files <dest> --db ./free-use-bible-api.db

…roups)

Expose the Theographic Bible Metadata dataset through the existing
dataset abstraction at /api/d/theographic/. Adds an import-bible-metadata
CLI command, a DatasetEntity table, generated list/detail JSON endpoints
for people, places, events, and people groups, SDK methods, OpenAPI
paths, and docs. Entities reference Bible passages by book/chapter/verse
and never duplicate Bible text.

Also fixes fetch-bible-metadata downloading a 404 for periods.json and
makes downloadFile throw on non-OK HTTP responses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant