Skip to content

Add Havrouta-Talmud link generation#29

Merged
kdroidFilter merged 8 commits intomasterfrom
feature/havrouta-talmud-links
Jan 14, 2026
Merged

Add Havrouta-Talmud link generation#29
kdroidFilter merged 8 commits intomasterfrom
feature/havrouta-talmud-links

Conversation

@kdroidFilter
Copy link
Owner

@kdroidFilter kdroidFilter commented Jan 14, 2026

Summary

  • Add GenerateHavroutaLinks.kt script to generate links between Havrouta commentaries and Talmud tractates
  • Extract bold text from Havrouta lines (original Talmud text) and match to corresponding Talmud lines
  • Create bidirectional links: Talmud→Havrouta (COMMENTARY) and Havrouta→Talmud (SOURCE)
  • Allow "הערות על חברותא" books to be imported (exception to notes file skip rule)
  • Add generateHavroutaLinks task to the generateSeforimDb pipeline

Test plan

  • Run full generateSeforimDb pipeline
  • Verify Havrouta books have links to Talmud tractates
  • Verify "הערות על חברותא" books are imported
  • Verify Otzaria links between Havrouta and Hearot al Havrouta are created

- Add GenerateHavroutaLinks.kt to generate links between Havrouta commentaries and Talmud tractates
- Extract bold text from Havrouta lines (original Talmud text) and match to corresponding Talmud lines
- Create bidirectional links: Talmud->Havrouta (COMMENTARY) and Havrouta->Talmud (SOURCE)
- Add generateHavroutaLinks Gradle task
Add exception for 'הערות על חברותא' files which are standalone books,
not companion notes to be attached to a base book.
Run after appendOtzaria and before buildCatalog to generate
Havrouta-Talmud links as part of the full database generation.
Process Otzaria link files to create links between Havrouta
commentaries and their corresponding Hearot al Havrouta books.
- Load all books and line IDs into RAM upfront
- Preload all link files into RAM
- Process all links in memory before batch insert
- Use transaction for faster inserts
- Disable foreign_keys, synchronous, and journal_mode during bulk ops
- Use insertLinksBatch() for faster bulk inserts
- Restore PRAGMA settings after completion
- Adjust line indices from 0-based Otzaria format to 1-based schema
- Resolve off-by-one errors in Havrouta link generation
- Add `setHearotAsDefaultCommentators` to associate Hearot books with corresponding Havrouta books by tractate.
- Log completion details and update default commentators for matching books in the repository.
@kdroidFilter kdroidFilter merged commit 44b16f6 into master Jan 14, 2026
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