Commit Graph

735 Commits

Author SHA1 Message Date
kennethreitz 17278b6bb0 Remove timeline visualization
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:58:26 -05:00
kennethreitz f4d2bf8ede Add interactive timeline visualization for biblical lifespans
- Create timeline page showing when biblical figures lived
- Display horizontal bars for each person's lifespan
- Filter by era (Antediluvian, Patriarchs, Judges, Kings, Exile)
- Filter to show Messianic line only or all people
- Golden highlighting for Christ's ancestors (Kekulé numbers)
- Hover tooltips with detailed person info
- Click to navigate to person's profile
- Zoom and pan support
- Update family tree page with prominent links to visualizations

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:57:24 -05:00
kennethreitz f38f88ed5d Enhance interactive tree: Kekulé highlights, search, navigation
- Add golden/yellow highlight for Kekulé ancestors (blood relations to Christ)
- Add search autocomplete for finding people quickly
- Implement back button navigation with history tracking
- Add more Messianic lineage starting points (Seth, Enoch, Shem, Isaac, Jacob, Judah, Solomon, Josiah, Joseph)
- Set vertical layout as default
- Default to 3 generations for cleaner view
- Adjust zoom for better readability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:52:33 -05:00
kennethreitz 7a3412e02c Redesign interactive tree with FamilySearch-inspired UI
Completely rewrote the interactive family tree visualization with a
much more polished, professional design inspired by FamilySearch and
MacFamilyTree applications.

Visual improvements:
- Person cards with gender-based color coding (blue for male, pink for female)
- Rounded card corners with subtle shadows and gradients
- Generation badges on each card
- Birth/death dates displayed on cards
- Smooth hover effects with border highlighting
- Clean, modern control bar with grouped buttons
- Slide-out info sidebar instead of inline panel

Functional improvements:
- Multiple starting points (Adam, Noah, Abraham, David, Jesus ancestors)
- Adjustable generation depth (3-10)
- Horizontal and vertical layout options
- Zoom controls (+, -, reset, fit to view)
- Scroll to zoom, drag to pan
- Click any person to see detailed info in sidebar
- Responsive design for mobile

Technical changes:
- Custom SVG card rendering with D3.js
- Dynamic tree building with direction support (descendants/ancestors)
- Fit-to-view algorithm for automatic centering
- Window resize handling
- Gender inference from name database

This provides a much better user experience for exploring the biblical
genealogy, matching the quality expected from professional genealogy
applications.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:42:44 -05:00
kennethreitz 2a23a35ac5 Add interactive D3.js family tree visualization
Created a new interactive family tree visualization page that allows
users to explore biblical genealogies with a zoomable, clickable tree
diagram.

Features:
- D3.js tree layout with horizontal orientation
- Click nodes to view person details in info panel
- Zoom in/out and pan functionality
- Multiple view options (descendants, ancestors, generation, lineage)
- Multiple layout options (tree, radial, dendrogram - foundation laid)
- Expand/collapse controls
- Hover effects and selection highlighting
- Links to full person profiles
- Responsive design with Tufte CSS styling

Technical details:
- New route: /family-tree/interactive
- Template: family_tree_interactive.html
- D3.js v7 for tree rendering
- Hierarchical data built from GEDCOM family tree data
- Passes family_tree_data and generations to template as JSON
- Max depth control to prevent infinite recursion

Also updated family tree overview page to link to new visualizations
section featuring both the interactive tree and messianic lineage.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:37:52 -05:00
kennethreitz 0ee9b3af96 Fix spouse link rendering with Jinja2 namespace scoping
Fixed issue where spouse links weren't rendering in the person detail
page. The problem was that Jinja2's `{% set %}` inside a for loop doesn't
persist variable values outside the loop scope.

Solution: Use Jinja2's `namespace()` object to create mutable variables
that persist across scopes. Applied fix to three locations where spouse
lookups occur:

1. Inline spouse in vitals section (line 119)
2. Spouse name in family diagram (line 204)
3. Dedicated Spouse relationship section (line 257)

Now Adam and Eve (and all other spouses) properly show as clickable
links to their person pages with full metadata.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:34:53 -05:00
kennethreitz 7f2a9b41de Add dedicated Spouse section to individual person view
Enhanced the person detail page with a proper Spouse relationship section
to match the existing Parents, Siblings, and Children sections.

Features:
- Dedicated "Spouse" section between Parents and Siblings
- Clickable link to spouse's person page if in family tree
- Displays spouse metadata (generation, Kekulé number, lifespan)
- Shows "not in family tree data" note for spouses not in GEDCOM
- Consistent styling with other relationship sections

This makes spouse information more prominent and easier to find,
improving navigation between married couples in the family tree.

Previously spouse was only shown inline in the vitals section.
Now it has its own dedicated section for better visibility and
consistency with how other relationships are displayed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:24:49 -05:00
kennethreitz e731fb289c Add three more documented biblical close family marriages
Added additional historically documented marriages:

1. Esau & Mahalath (first cousins) - Genesis 28:9
   - Mahalath was daughter of Ishmael, Isaac's half-brother

2. Othniel & Achsah (uncle-niece) - Judges 1:12-13
   - Achsah was daughter of Caleb, Othniel's brother
   - Given as reward for capturing Kiriath Sepher

3. Zelophehad's five daughters & their cousins - Numbers 36:11
   - Mahlah, Tirzah, Hoglah, Milcah and Noah
   - Married their father's brothers' sons (first cousins)
   - Required to keep tribal inheritance within the family

Total documented close family marriages: 9 cases

These marriages provide important historical context about:
- Ancient Near Eastern marriage customs
- Tribal inheritance laws in Israel
- How family structures evolved over biblical history
- Cultural differences between ancient and modern times

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:23:46 -05:00
kennethreitz a8b480b3ba Add documented biblical close family marriages data
Created supplemental data file with 6 known close family marriages
from Scripture to provide accurate historical context.

New Data Files:
- close_family_marriages.json: Documented biblical marriages including:
  * Abraham & Sarah (half-siblings) - Genesis 20:12
  * Amram & Jochebed (aunt-nephew) - Exodus 6:20
  * Jacob & Leah (first cousins) - Genesis 29:16
  * Jacob & Rachel (first cousins) - Genesis 29:16
  * Nahor & Milcah (uncle-niece) - Genesis 11:29
  * Isaac & Rebekah (first cousin once removed) - Genesis 24:15

- schemas/close_family_marriages.schema.json: JSON schema with:
  * Required fields: person1, person2, relationship, description, verse
  * Enum for relationship types
  * Pattern validation for verse references
  * Optional notes field for additional context

API Changes:
- Add _load_close_family_marriages() helper function with LRU cache
- Load and count known marriages in statistics endpoint
- Statistics now show accurate count: 6 close family marriages
- Provides educational context about ancient Near Eastern customs

Each marriage entry includes:
- Names of both parties
- Specific relationship type (half-siblings, first cousins, etc.)
- Detailed description of the family connection
- Biblical verse reference documenting the marriage
- Additional notes with relevant quotes or context

This helps users understand how family structures and marriage
customs differed in biblical times compared to modern standards.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:22:43 -05:00
kennethreitz 51e4eeb561 Add more interesting family tree statistics
New statistics added to the family tree overview:

Most Siblings:
- Tracks which person had the most siblings
- Currently shows Nathan with 18 siblings (one of David's 19 children)

Close Family Marriages:
- Detects marriages between close relatives
- Checks for sibling marriages and aunt/uncle-niece/nephew relationships
- Shows 0 in current GEDCOM data
- Provides historical context: "common in early biblical times"
- Important for understanding biblical/ancient Near Eastern culture

API Changes:
- Add most_siblings field to FamilyTreeStatsResponse
- Add close_family_marriages field with description
- Calculate sibling counts from GEDCOM relationship data
- Detect close family relationships through parent/sibling analysis

Template Updates:
- Add "Most Siblings" row with clickable link to person page
- Add "Close Family Marriages" row with contextual note
- Populate values via JavaScript from stats API

Test Updates:
- Add assertions for most_siblings structure
- Add assertions for close_family_marriages value
- Verify all new fields are present and correctly typed

This helps provide educational context about how family structures
differed in ancient biblical times compared to modern norms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:20:00 -05:00
kennethreitz f7013de63a Enhance family tree statistics with biography data and fix Methuselah
Major improvements to statistics endpoint and display:

API Enhancements:
- Add person_id to PersonStat model for accurate linking
- Integrate biographies.json data to supplement GEDCOM ages
- Support name aliases (e.g., "Mathusala or Methuselah" -> "Methuselah")
- Fix Methuselah showing as longest lived (969 years vs Adam's 930)
- Increase age data coverage from 1 to 53 people with known ages
- Improve average lifespan calculation (241.5 years with better data)

Template Improvements:
- Add clickable links to person pages in statistics
- Use actual GEDCOM person IDs instead of name slugs
- Remove average lifespan display from table (cleaner UI)

Test Updates:
- Add person_id field assertions to stats endpoint test
- Verify correct response structure with IDs

Statistics now show:
- 479 total people in genealogy
- 41 generations from Adam to Jesus
- Methuselah as longest lived (969 years)
- David with most children (19)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:18:20 -05:00
kennethreitz decc341452 Display family tree statistics on overview page
- Add statistics table to family tree overview showing:
  - Total people (479)
  - Total generations (41)
  - Longest lived person (Adam - 930 years)
  - Person with most children (David - 19 children)
  - Average lifespan with data coverage
- Fetch statistics from /api/family-tree/stats endpoint via JavaScript
- Display loading state while fetching data
- Clean table layout for better readability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:14:07 -05:00
kennethreitz e4940d89c8 Add family tree statistics API endpoint
- Add GET /api/family-tree/stats endpoint with comprehensive GEDCOM statistics
- Returns total people, generations, longest lived person, person with most children
- Parses "Lived XXX years" format from GEDCOM death records
- Calculates average lifespan for people with known ages
- Add comprehensive tests for statistics endpoint
- Update API index to include new stats endpoint

Statistics from the biblical genealogy GEDCOM:
- 479 total people
- 41 generations from Adam to Jesus
- David had the most children (19)
- Adam is the longest lived with recorded age (930 years)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:12:44 -05:00
kennethreitz 7e71b762b7 Add Isaiah, Ezra, and Nehemiah to biblical biographies
Added comprehensive biographies for the last 3 missing major figures:

1. Isaiah - The evangelical prophet
   - Vision of God's holiness in the temple
   - Extensive messianic prophecies (virgin birth, suffering servant)
   - Most quoted OT prophet in the New Testament

2. Ezra - Priest and scribe
   - Led second wave of exiles from Babylon
   - Reestablished centrality of God's Law
   - Religious reform and covenant renewal

3. Nehemiah - Rebuilding leader
   - Rebuilt Jerusalem's walls in 52 days
   - Exemplary prayer and practical leadership
   - Worked with Ezra in spiritual restoration

All major biblical figures now have biographies. The remaining ~400
people in the GEDCOM are mostly genealogical entries (the 'begats').

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 14:01:58 -05:00
kennethreitz 6464844e95 Add Jonathan (David's friend) to biblical biographies
Added comprehensive biography for Jonathan including:
- Summary of his friendship with David and royal lineage
- Theological significance as example of sacrificial friendship
- 7 key life events from military victories to death at Mount Gilboa

Jonathan was the only major figure from the list missing - all others
(Eve, Cain, Abel, Jesus, David, Solomon, Mary, Daniel, Ruth) already
had biographies.

Now accessible via GET /api/family-tree/Jonathan

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:58:09 -05:00
kennethreitz dfb152b6a1 Revert to min_machines_running = 1
Keep blue-green deployment strategy but with single minimum machine to reduce costs. During deployment, Fly.io will:
- Start new machine (green)
- Run health checks
- Switch traffic
- Stop old machine (blue)

Note: This may have brief startup time during deployment, but significantly reduces operating costs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:52:34 -05:00
kennethreitz 32bced2927 Enable blue-green deployment strategy
Changes:
- Added [deploy] strategy = "bluegreen" to fly.toml
- Increased min_machines_running from 1 to 2
- Disabled auto_stop_machines to keep both environments ready
- Updated GitHub Actions workflow with --strategy bluegreen flag

How Blue-Green Works:
1. Deploy creates new "green" environment alongside current "blue"
2. Health checks verify green environment is healthy
3. Traffic switches instantly from blue to green
4. Old blue environment kept briefly for instant rollback
5. Zero downtime during deployments

Cost Impact:
- Runs minimum 2 machines instead of 1
- Ensures true zero-downtime deployments
- Instant rollback capability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:52:19 -05:00
kennethreitz 8ea1b53031 Add Job to biblical biographies
Added comprehensive biography for Job including:
- Summary of his story from the Book of Job
- Theological significance as prefiguring Christ
- 7 key life events from suffering to restoration

Now accessible via GET /api/family-tree/Job

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:48:27 -05:00
kennethreitz c2a274f47f Suppress FastAPI example/examples deprecation warnings
The warnings are cosmetic - we use 'example' instead of 'examples' because it works better for pre-filling Swagger UI input fields with default values.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:47:12 -05:00
kennethreitz 999265e90e Add 5 new API endpoints with comprehensive tests
New Endpoints:
1. GET /api/verse/random - Random verse with OT/NT/book filtering
2. GET /api/commentary/{book}/{chapter}/{verse} - AI-generated verse commentary
3. GET /api/chapter-commentary/{book}/{chapter} - Chapter explanations
4. POST /api/verses/bulk - Bulk verse lookup
5. GET /api/family-tree - List biblical figures
6. GET /api/family-tree/{name} - Get biography with alias support

Features:
- Random verse supports testament (ot/nt) and book filters
- Commentary includes analysis, historical context, and reflection questions
- Chapter commentary provides context for each chapter
- Bulk lookup handles multiple verse references in one request
- Family tree supports name aliases (e.g., Israel → Jacob)
- All endpoints include comprehensive OpenAPI documentation

Tests:
- Added 19 new tests (78 total, all passing)
- Test coverage for all new endpoints
- Edge case handling (invalid inputs, 404s, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:46:33 -05:00
kennethreitz 87a85c979c Add red letter (words of Christ) API endpoints
- Added /api/red-letter endpoint for listing all verses where Jesus speaks
  - Supports filtering by book
  - Includes pagination (limit/offset)
  - Returns verse text, reference, and whether full or partial

- Added /api/red-letter/stats endpoint for statistics
  - Total count of red letter verses
  - Breakdown by full vs partial verses
  - Count by book
  - List of books containing red letter verses

- Added 8 comprehensive tests (59 total tests now)
- All tests passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:40:22 -05:00
kennethreitz 94a8801251 Add Swagger UI defaults and enable JSON file watching in Docker
- Updated all API endpoint parameters to use `example` instead of `examples` for better Swagger UI experience
- Parameters now pre-fill with reasonable defaults when testing endpoints in /api/docs
- Added --reload and --reload-include '*.json' flags to docker-compose for auto-reload on JSON changes
- Included commentary-generator agent configuration for AI-powered verse commentary

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:37:04 -05:00
kennethreitz 2776aa984a Add PDF export and comprehensive tests for Resources API
New features:
- PDF export endpoints for resources
  * GET /api/resources/{category}/pdf - Category PDF
  * GET /api/resources/{category}/{slug}/pdf - Item PDF
  * Proper error handling (404 before 503)
  * Uses existing resource_detail_pdf.html templates

- Add html_url field to resource categories
  * Provides web URL in addition to API URL
  * Format: /biblical-locations (kebab-case)
  * Helps clients link to HTML pages

Comprehensive test coverage (12 new tests):
- test_list_all_resources - List all 39 categories
- test_get_resource_category - Get category items
- test_get_resource_category_biblical_locations - Nested structures
- test_get_resource_item - Get specific item with verses
- test_get_resource_item_from_different_categories - Multiple types
- test_get_nonexistent_resource_category - 404 handling
- test_get_nonexistent_resource_item - Item 404
- test_resource_category_pdf - PDF generation
- test_resource_item_pdf - Item PDF
- test_resource_pdf_nonexistent_category - PDF 404
- test_resource_pdf_nonexistent_item - Item PDF 404
- test_all_resource_categories_accessible - All categories work

All 51 API tests passing (was 39, added 12).

Note: PDF route ordering with FastAPI path matching is documented
in tests. More specific routes should ideally come before general ones.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:32:48 -05:00
kennethreitz fb506d49cc Add comprehensive Resources API endpoints
New endpoints:
- GET /api/resources - List all 39 resource categories
- GET /api/resources/{category} - Get all items in a category
- GET /api/resources/{category}/{slug} - Get specific resource details

Features:
- Pydantic response models with OpenAPI documentation
- Complete examples in Swagger UI
- Support for all 39 resource categories:
  * Biblical locations (Old/New Testament)
  * Angels, Prophets, Apostles, Women of the Bible
  * Parables, Miracles, Prayers, Beatitudes
  * Names of God, Names of Christ, I AM Statements
  * Theological resources (Trinity, Christology, Soteriology, etc.)
  * Systematic theology (Bibliology, Pneumatology, Eschatology, etc.)
  * Armor of God, Ten Commandments, Fruits of the Spirit
  * Covenants, Festivals, Types & Shadows, Messianic Prophecies
  * And many more...

Technical implementation:
- Handles nested resource structures (e.g., biblical_locations with OT/NT subcategories)
- Recursive slug-based search for flexible data access
- Full verse references included with each resource item
- Comprehensive category metadata (item counts, URLs)
- Clean JSON responses with proper field descriptions

All existing tests pass - no breaking changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:28:31 -05:00
kennethreitz 63ced29b6b Add red letter (words of Christ) to API verse endpoints
- Add red_letter field to all verse API responses
  * /api/verse/{book}/{chapter}/{verse} - single verse
  * /api/verse-range/{book}/{chapter}/{start}/{end} - verse ranges
  * /api/verse-of-the-day - daily verse

Red letter field values:
  * null - Jesus doesn't speak in this verse
  * "full" - entire verse is Jesus speaking (e.g., John 3:16)
  * "quoted text" - partial verse with exact words Jesus spoke

- Add Pydantic response models for OpenAPI documentation
  * VerseResponse - single verse with red_letter field
  * VerseRangeResponse - verse range with red_letter per verse
  * DailyVerseResponse - daily verse with red_letter
  * Includes comprehensive examples showing all red letter scenarios

- Enhance OpenAPI/Swagger documentation
  * Add detailed response examples for each endpoint
  * Multiple example scenarios (Jesus speaking, not speaking, partial)
  * Improved parameter descriptions with validation (ge=1)
  * Better endpoint summaries and descriptions

- Add comprehensive test coverage for red letter feature
  * test_red_letter_full_verse - Jesus speaks entire verse
  * test_red_letter_partial_verse - Jesus speaks part of verse
  * test_red_letter_no_words - Jesus doesn't speak
  * test_red_letter_verse_range_with_christ_words - range test
  * Update existing tests to verify red_letter field presence

All 39 API tests pass with no warnings.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:23:02 -05:00
kennethreitz 508bcd7c7c Add biography aliases and Malachi 3:6 commentary
- Add comprehensive name aliases for 19 biblical figures
  Resolves issue where GEDCOM compound names (e.g., "Jacob or Israel")
  couldn't find biographies stored under single names (e.g., "Jacob")

  Added aliases for: Jacob/Israel, Abraham/Abram, Judah/Juda/Judas,
  Boaz/Booz, Shem/Sem, Tamar/Thamar, Methuselah/Mathusala,
  Bathsheba/Bathshua, Caleb/Chelubai, Enoch/Henoch, Jared/Jered,
  Jehoshaphat/Josaphat, Joram/Jehoram, Nahor/Nachor, Peleg/Phalec,
  Rehoboam/Roboam, Terah/Thara, Eber/Heber, Cainan/Kenan, Adah/Bashemath

- Add AI-generated commentary for Malachi 3:6
  Explores divine immutability, covenant faithfulness, and God's
  unchanging character as foundation for Israel's preservation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:16:16 -05:00
kennethreitz ee89209da6 Add AI-generated commentary for Malachi 3:1
Generated using commentary-generator agent with Reformed theological perspective.

Commentary includes:
- Deep theological analysis with Hebrew text and transliteration
- Messianic prophecy exposition (John the Baptist and Jesus)
- Post-exilic historical context
- Cross-references to NT fulfillment passages
- Practical application questions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 13:02:37 -05:00
kennethreitz d38ec3044c Add biblical commentary generation agent
- Create Claude Agent SDK agent for generating verse commentary
- Define quality standards matching existing commentary (1 Timothy 2:5)
- Include comprehensive specification document
- Agent generates JSON with analysis, historical context, and questions
- Reformed/evangelical theological perspective with original language analysis

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:58:12 -05:00
kennethreitz 6df09c7665 Suppress WeasyPrint stdout/stderr noise during import
WeasyPrint outputs logging messages to stdout/stderr when imported,
which pollutes the console output. This change temporarily redirects
stdout/stderr to /dev/null during the import, then restores them.

Changes:
- Added sys and os imports
- Wrapped WeasyPrint import with stdout/stderr suppression
- Properly restore stdout/stderr in finally block

Result: Clean import with no console noise

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:52:21 -05:00
kennethreitz 98c53b6025 Remove redundant pauline_commentary.json
The verse_commentary.json already contains extensive high-quality commentary
on all Pauline epistles with superior analysis. The pauline_commentary.json
was redundant and of lower quality.

Current Pauline coverage in verse_commentary.json:
- Complete: Romans, 1-2 Corinthians, Galatians, Ephesians, Philippians,
  Colossians, 1-2 Thessalonians, 1-2 Timothy, Titus, Philemon
- All key verses already covered with detailed theological analysis

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:50:52 -05:00
kennethreitz 7acb2f6981 Move red_letter_verses.schema.json to schemas directory
Organize schema files:
- Moved red_letter_verses.schema.json to schemas/ directory
- Updated README.md references to point to new location (schemas/red_letter_verses.schema.json)
- Maintains consistency with other schema files (all now in schemas/ directory)

The validation script (scripts/validate_data.py) already uses the schemas/ directory, so no code changes needed.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:34:05 -05:00
kennethreitz f53993c33a Add 23 more biographies for notable biblical figures
Added biographies for:
- Women: Naamah, Asenath, Ahinoam, Abigail, Abital, Eglah, Haggith, Adah, Zillah, Hagar, Keturah (11 total)
- Early Patriarchs: Terah, Nahor, Eber, Peleg, Cainan, Jared, Ham, Japheth, Lamech (9 total)
- Kings: Rehoboam, Asa (2 total)
- Other: Korah (1 total)

Each biography includes summary, significance, and key events with verse references.
Total biographies: 122 (was 99)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:22:35 -05:00
kennethreitz 858cb4eed1 Add biographies for 36 biblical figures from family tree
Added comprehensive biographies for significant people in the GEDCOM family tree who were missing entries:
- Patriarchal family: Benjamin, Reuben, Simeon, Dan, Naphtali, Gad, Asher, Issachar, Zebulun, Dinah, Bilhah, Zilpah, Laban
- Joseph's sons: Manasseh, Ephraim
- David's family: Absalom, Amnon, Adonijah, Tamar, Nathan, Joab, Abishai, Abinadab, Eliab, Shimma
- Kings of Judah: Jehoshaphat, Joram, Ahaziah, Amaziah, Azariah, Jotham, Ahaz, Amon, Jehoiakim, Jeconiah, Zedekiah

Each biography includes summary, significance, and key events with verse references.
Total biographies: 99 (was 63)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:06:53 -05:00
kennethreitz 4ec825669d Manually fix remaining 33 red letter verses
Fixed all remaining verses with complex narrative structures:
- 27 verses updated with correct spoken words only
- 6 verses removed (not Jesus speaking or too complex):
  • Mark 16:7 (angel speaking)
  • Luke 9:33 (Peter speaking)
  • Luke 13:23 (answer continues in v24)
  • Luke 15:17 (prodigal son speaking)
  • Luke 18:4 (unjust judge in parable)
  • John 21:15 (mixed dialog, too complex)

Examples of fixes:
- Matthew 16:8: "Which when Jesus perceived, he said unto them," → black
  Only "O ye of little faith..." → red
- John 8:10: "When Jesus had lifted up himself, and saw none but the woman, he said unto her," → black
  Only "Woman, where are those thine accusers?..." → red
- John 19:30: "When Jesus therefore had received the vinegar, he said," → black
  Only "It is finished:" → red
- Luke 22:52: Narrative intro → black, "Be ye come out..." → red

Total red letter fixes this session:
- 48 verses fixed automatically
- 33 verses fixed manually
- 81 verses total corrected ✓

Red letter edition is now accurate across all Gospels!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 02:31:05 -05:00
kennethreitz d56a2ea243 Fix red letter edition narrative text issue
Fixed 48 verses where narrative introductions (like "Jesus answered them,")
were incorrectly marked in red. Only Christ's actual spoken words should be red.

Automatically fixed verses including:
- John 8:34: "Jesus answered them," → now in black
- John 8:19, 8:49, 8:54: "Jesus answered," → now in black
- Matthew 11:25, 12:39, 15:3, 15:13, 17:22, 17:26, 21:30, 21:31, 25:12, 26:10
- Mark 12:29, Luke 4:4, John 5:17, 6:70, 7:16, 10:25, 10:32, 10:34, 13:8
- And 29 more verses across Matthew, Mark, Luke, and John

Added script: scripts/fix_red_letter_narrative.py
- Automatically extracts spoken words from narrative text
- Uses regex patterns to identify narrative introductions
- 48 verses fixed, 33 remaining for manual review

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 02:28:11 -05:00
kennethreitz 5196b53245 Remove link from Greek and Hebrew text line in README
Keep descriptive text but remove hyperlink as requested.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 01:33:31 -05:00
kennethreitz 7dae118c3e Add 118 comprehensive verse commentaries
Large batch spanning entire Bible:

Pentateuch: Deuteronomy 1:5, 3:24, 7:6, 18:2, 33:25, 34:6
Numbers 3:41, 10:15, 16:2, 30:3, 33:1, 33:9, 35:34

History: Joshua 8:22, 9:21, 10:10, 13:10, 22:13, 24:5
Judges 19:21; Ezra 2:68, 4:5, 10:32, 10:40; Esther 8:11

Wisdom & Poetry: Job 5:23, 7:17, 10:11, 11:10, 16:4, 18:14, 20:6, 33:24
Psalms 6:9, 31:6, 44:21, 49:9, 49:10, 58:8, 86:6, 89:30, 105:1, 107:16,
107:40, 109:20, 109:26, 113:9, 136:8, 141:6
Proverbs 1:24, 3:4, 4:22, 10:23, 16:6, 27:6, 30:25
Ecclesiastes 1:15, 9:7; Lamentations 5:12

Prophets: Isaiah 24:19, 52:8, 66:7; Jeremiah 6:29, 9:20, 17:21, 23:15,
28:4, 29:32, 32:10, 36:3; Ezekiel 3:7, 7:12, 16:39, 19:5, 20:39, 20:49,
27:17, 33:31, 37:23, 40:33, 42:12; Daniel 2:18, 2:38, 4:5, 12:8
Hosea 11:7; Micah 3:4; Nahum 1:5, 3:7; Zephaniah 3:1; Zechariah 1:5, 11:16

Gospels: Matthew 12:28, 18:2, 24:50, 27:7
Mark 4:35, 10:50, 15:35; Luke 12:31, 14:19, 15:24, 18:9, 18:26, 23:18,
23:27, 23:29; John 13:18, 19:10, 20:7

Acts: 8:8, 15:17, 18:24, 19:35, 22:6, 27:38, 27:42

Epistles: Hebrews 2:4

Each with deep theological analysis, Hebrew/Greek word studies,
historical context, and 5 reflection questions.

Coverage: ~40.5% of Bible (12,200+ verses)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 01:31:59 -05:00
kennethreitz 1f5a237695 Add 98 comprehensive verse commentaries across Bible
Large-scale commentary addition spanning both testaments:

Pentateuch & History: Deuteronomy 3:9, 4:10, 11:21, 16:19, 22:29, 28:32, 30:7
Joshua 4:2, 10:13, 10:36, 19:36, 22:19; Judges 8:14, 19:9
Numbers 3:17, 15:3, 16:31, 18:24, 27:4, 33:48; Ezra 2:5, 10:20

Wisdom & Poetry: Job 2:13, 5:13, 10:15, 12:1, 14:6, 16:19, 17:2, 20:2, 37:1
Psalms 18:31, 22:12, 24:1, 34:15, 38:20, 44:11, 48:1, 78:48, 81:14, 119:85,
119:100, 137:8, 144:11; Proverbs 2:18, 4:11, 10:5, 13:24, 20:21
Ecclesiastes 2:20, 8:17, 10:14; Song of Solomon 1:11, 5:13

Prophets: Isaiah 1:14, 26:21, 37:1, 47:11, 48:6, 57:15
Jeremiah 9:23, 14:9, 22:3, 31:13, 36:25, 49:13
Ezekiel 4:14, 5:6, 7:27, 13:6, 14:18, 18:22, 27:28, 34:10, 34:14, 36:7, 38:3, 40:49
Daniel 9:24; Hosea 8:9; Jonah 1:7, 1:11; Micah 5:1; Nahum 3:15; Amos 4:10
Zechariah 9:12

Gospels & Acts: Matthew 1:5, 8:24, 8:34, 21:12, 23:7; Mark 14:25
Luke 6:19, 8:23, 8:24, 10:26, 12:19, 24:26
John 4:24, 6:56, 11:25, 13:37, 14:24, 17:12, 18:40, 19:15, 20:12
Acts 2:40, 4:5, 4:27, 9:18, 9:42, 11:5, 14:25, 15:20, 20:12, 21:29, 22:4, 22:24, 26:27

Epistles: Hebrews 2:15, 9:3, 12:16; 1 John 4:11

Each with deep theological analysis, Hebrew/Greek word studies,
historical context, and 5 reflection questions.

Coverage: ~40% of Bible (12,100+ verses)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 01:13:35 -05:00
kennethreitz d705791ea9 Update README with prominent Docker quick start
Changes:
- Add "Quick Start - Run It Yourself" section at top
- Feature docker compose up as the easiest way to run locally
- Streamline Installation section with Docker as recommended
- Reorganize for better developer experience
- Remove redundant Docker instructions

Makes it immediately clear how to run the project locally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 01:11:57 -05:00
kennethreitz 3abcac4ce3 Add 36 more diverse verse commentaries
Added comprehensive commentary spanning OT and NT:

New Testament: John 4:24, 13:37; 1 John 4:11; Hebrews 4:5, 11:16;
Acts 4:35, 11:1, 28:29; Luke 6:19; Mark 6:21, 12:19, 12:41, 14:23, 15:12

Psalms: 55:14, 72:10, 94:20, 119:26

Wisdom: Proverbs 3:11, 20:10; Job 17:2; Ecclesiastes 8:17

Prophets: Isaiah 54:8; Jeremiah 25:12; Ezekiel 18:15, 21:2, 26:19;
Hosea 13:16; Lamentations 3:46; Malachi 2:1

Law/History: Joshua 15:53, 19:3, 23:16; Numbers 21:10, 22:20; Ezra 8:14

Each with deep theological analysis, Hebrew/Greek word studies,
historical context, and 5 reflection questions.

Coverage: ~39.1% of Bible

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:50:03 -05:00
kennethreitz 8cc61f5465 Add 36 diverse verse commentaries across multiple books
Added comprehensive commentary for 36 verses spanning Old and New Testament:

Psalms: 36:6, 50:11
Isaiah: 13:9, 24:6, 26:18, 46:8, 51:15
Jeremiah: 14:4, 22:23, 25:38
Ezekiel: 19:11, 20:26
Zechariah: 8:2
Proverbs: 1:20
Job: 34:17, 40:11
Ecclesiastes: 9:1
Matthew: 20:1
Luke: 23:12
John: 5:44, 5:45
Acts: 8:6, 28:27
Hebrews: 13:11
1 John: 5:2
Deuteronomy: 18:21, 25:3, 26:10, 29:28
Judges: 18:27
Numbers: 4:43, 7:68, 15:7, 16:5, 26:45
Esther: 9:10

Each entry includes:
- Deep theological analysis (150-200+ words)
- Hebrew/Greek word studies with transliterations
- Historical and cultural context (100-150+ words)
- 5 thoughtful reflection questions
- Proper HTML formatting for web display

Total commentary coverage now: ~39% of Bible (12,019+ verses)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:39:44 -05:00
kennethreitz 5d5fecf81a Add comprehensive commentary for top 100 Bible verses
Achieved 100% coverage of the top 100 most-read Bible verses through
parallel agent execution. Added 29+ new high-quality commentary entries.

Changes:
- Added Psalm commentary: 23:4, 18:2, 37:4, 55:22, 34:8, 56:3, 62:5-6,
  91:2, 103:2-3, and others
- Added Gospel commentary: Matthew 5:3-6, 5:16, 6:34, 7:8, 28:20
- Added Hebrews commentary: 12:1-2, 13:8
- Added Proverbs commentary: 4:23, 18:10
- Added Joshua commentary: 1:9, 24:15
- Added other key verses: John 8:32, 16:33, Isaiah 9:6

Each entry includes:
- Deep theological analysis (150-200+ words)
- Hebrew/Greek word studies with transliterations
- Historical and cultural context (100-150+ words)
- 5 thoughtful reflection questions
- Proper HTML formatting for web display

Total verse commentary entries: 12,000+

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:31:07 -05:00
kennethreitz d782378947 Remove chapter overview section from chapter pages
- Removed chapter overview HTML block and conditional rendering
- Removed .chapter-overview-divider CSS styling
- Removed JavaScript code that linked verse references in overview
- Streamlines chapter pages to focus on verse content

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:39:45 -05:00
kennethreitz 02f7f14a0f Add commentary for 24 high-priority verses via parallel agents
Used 12 parallel agents to systematically add comprehensive commentary for
top Bible verses missing substantive content.

Verses added:

Gospel & Salvation:
- Matthew 19:26 - With God all things are possible
- Luke 1:37 - Nothing shall be impossible with God

Comfort & Trust:
- Isaiah 40:31 - Renew their strength, mount up with wings as eagles
- Isaiah 41:10 - Fear not, for I am with thee
- Psalm 27:1 - The LORD is my light and salvation
- Psalm 37:4 - Delight thyself in the LORD
- Psalm 56:3 - What time I am afraid, I will trust in thee
- Psalm 103:12 - As far as east from west, removed our transgressions
- Psalm 118:24 - This is the day the LORD hath made
- Psalm 119:105 - Thy word is a lamp unto my feet
- Psalm 121:1-2 - I will lift up mine eyes unto the hills
- 1 Peter 5:7 - Casting all your care upon him

Guidance & Obedience:
- Proverbs 16:3 - Commit thy works unto the LORD
- Proverbs 22:6 - Train up a child in the way he should go
- Isaiah 26:3 - Thou wilt keep him in perfect peace
- Isaiah 53:6 - All we like sheep have gone astray

Prayer & Faith:
- Matthew 7:7 - Ask, seek, knock
- 1 Thessalonians 5:16-18 - Rejoice, pray, give thanks

Discipleship & Mission:
- Matthew 5:14 - Ye are the light of the world
- Matthew 22:37 - Greatest commandment (love God)
- Matthew 28:19 - Great Commission
- John 10:10 - I am come that they might have life abundantly
- John 14:27 - My peace I give unto you
- John 15:13 - Greater love hath no man than this

Total verses with commentary: 11,989 (up from 11,965)
Coverage of top 100 verses: 71% (71/100)

Each commentary includes deep theological analysis with original language
studies, historical/cultural context, and 5 reflection questions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:35:37 -05:00
kennethreitz c675e320d7 Add missing commentary for Jeremiah 29:11, John 14:6, John 1:1
These 3 verses were not saved in the previous commit due to encoding error.
Now all 15 top Bible verses have comprehensive commentary.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:22:11 -05:00
kennethreitz 46928dacb7 Add comprehensive commentary for 15 top Bible verses
Added deep theological commentary with Greek/Hebrew word studies for:

Gospel & Salvation:
- Jeremiah 29:11 - God's plans for peace and hope
- John 14:6 - The way, truth, and life
- John 1:1 - The eternal Word made flesh
- John 3:3 - You must be born again
- Isaiah 53:5 - Suffering servant, wounded for our transgressions
- 1 John 1:9 - Confession and forgiveness

Psalms (Comfort & Trust):
- Psalm 23:1 - The LORD is my shepherd
- Psalm 46:1 - God our refuge and strength
- Psalm 91:1 - Dwelling in the secret place
- Psalm 139:14 - Fearfully and wonderfully made

Christian Living:
- Proverbs 3:5-6 - Trust in the LORD, not your own understanding
- Matthew 6:33 - Seek first the kingdom of God
- Matthew 11:28 - Come unto me, all who are weary
- Hebrews 11:1 - Definition of faith

Each commentary includes:
- Detailed analysis with original language study
- Historical and cultural context
- 5 reflection questions for application

Total verses with commentary now: 11,965 (up from 11,950)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:20:21 -05:00
kennethreitz 79f5ea890a Fix verse commentary validation and field names
- Update Pydantic model to match nested JSON structure (Book → Chapter → Verse)
- Rename field: historical_context → historical (11,950 entries)
- Remove unused application field
- Update VerseCommentary schema with nested VersesDict and ChaptersDict
- All 18 data validation tests now passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:08:03 -05:00
kennethreitz e3159c2713 Add utility script to list verses without commentary
Provides comprehensive statistics and filtering options:
- Shows overall stats: 31,102 verses, 11,917 with commentary (38.3%)
- Filter by book and/or chapter
- Show random verses without commentary
- Breakdown by book showing where commentary is needed

Usage examples:
  python scripts/list_unwritten_commentary.py --stats
  python scripts/list_unwritten_commentary.py --book John --chapter 3
  python scripts/list_unwritten_commentary.py --random 10

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:03:32 -05:00
kennethreitz 8e22a0fe80 Clean up verse commentary and add John 3:16
- Remove 2,871 verses with generic template commentary
- Keep 11,950 verses with substantive content
- Restructure JSON from flat to nested format (Book → Chapter → Verse)
- Update schema to reflect nested structure
- Add comprehensive commentary for John 3:16 with Greek word studies
- Update commentary.py to handle both flat and nested JSON formats
- Add *.backup to .gitignore

File size reduced from 47MB to 36MB after removing generic content.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:02:06 -05:00
kennethreitz 3b48e6fa7b Remove generic commentary from verses without substantive content
Verses without verse-specific commentary now return None for analysis,
historical context, and questions sections instead of generic template
text that could apply to any verse.

Changes:
- Set analysis, historical, and questions to None for non-enhanced verses
- Template already checks for these values before rendering sections
- Verses with real commentary (like Psalm 1:4, Revelation 1) unaffected
- Reduces clutter and improves signal-to-noise ratio

Result: Verse pages now show only verse text, word-by-word analysis,
and cross-references unless there's genuine verse-specific commentary.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 19:47:08 -05:00