Skip to content

Add Wordproject audio Bible downloader and metadata - #136

Merged
KallynGowdy merged 1 commit into
mainfrom
claude/blissful-wright-nslmt9
Nov 16, 2026
Merged

KallynGowdy merged 1 commit into
mainfrom
claude/blissful-wright-nslmt9

Conversation

@KallynGowdy

Copy link
Copy Markdown
Collaborator

Summary

This PR adds tooling to download and process audio Bibles from Wordproject (https://www.wordproject.org/bibles/audio/index.htm) and integrate them into the Free Use Bible API's audio file structure.

Key Changes

  • wordproject-audio.ts: New module defining metadata for 101 Wordproject audio Bible sets

    • Exports WordprojectAudioSet interface with audio Bible configuration (language, narrated text, zip locations, matching translations)
    • Defines WordprojectMatch type to categorize how well each audio matches available API translations (exact, close, unverified, poor, none)
    • Includes WORDPROJECT_AUDIO_SETS array with complete metadata for all available audio Bibles
    • Provides utility functions: getBookNumbers(), getZipUrls(), and getChapterFromEntryName() for working with the audio files
    • Documents how translations were matched and includes notes on quality/caveats for each set
  • fetch-wordproject-audio.ts: New CLI tool to download and extract audio Bibles

    • Downloads zip files (one per book) from Wordproject servers with retry logic and mirror host fallback
    • Extracts MP3 files and organizes them into the API's directory structure: {output}/api/{translation}/{bookId}/{chapter}/audio/{reader}.mp3
    • Supports filtering by audio Bible set, translation match quality, and custom translation mappings via --map
    • Implements concurrent downloads (configurable via --concurrency) with a worker pool pattern
    • Provides --list option to display all available audio Bibles and their metadata
    • Includes dry-run mode and detailed error reporting with summary statistics
    • Caches downloaded zips to avoid re-downloading on subsequent runs
  • package.json: Added fetch:wordproject:audio npm script

Notable Implementation Details

  • Handles non-standard zip naming conventions (e.g., Modern Greek Old Testament uses book names instead of numbers)
  • Intelligently extracts chapter numbers from various MP3 file naming patterns
  • Validates that multiple audio sets don't write to the same translation/reader combination
  • Provides detailed warnings for poor-quality matches and missing translations
  • Uses @zip.js/zip.js for cross-platform zip extraction without native dependencies

tools/fetch-wordproject-audio.ts downloads the Wordproject audio Bibles one
zip per book and unzips each chapter into
api/{translation}/{bookId}/{chapter}/audio/wordproject.mp3.

tools/wordproject-audio.ts maps each of the 55 audio Bibles to the Free Use
Bible API translations it matches, rated exact, close, unverified, poor or
none from comparing Wordproject's John 1 and Genesis 1 text with each
translation in the same language.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LsURxq36pDnj4CC4x2Bix
@github-actions

Copy link
Copy Markdown

@KallynGowdy
KallynGowdy merged commit 35038ea into main Nov 16, 2026
14 checks passed

This branch was successfully deployed

1 active deployment
docs-preview — cde97a79 Deployed Nov 16, 2026 by KallynGowdy via Deploy preview #31
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.

2 participants