bible_parser_flutter 0.2.2
bible_parser_flutter: ^0.2.2 copied to clipboard
A Flutter package for parsing Bible texts in OSIS, USFX, and ZXBML formats with direct parsing and database-backed approaches.
0.2.2 TransChange Support for Added Text #
Added #
- TransChange support for OSIS format to track added/italicized text
- Parser now recognizes
<transChange type="added">tags in OSIS XML - New
transChangegetter onTextSegmentclass - New
isAddedconvenience getter to identify added text segments - Apps can now italicize or style text marked as translator additions
- Parser now recognizes
- Added comprehensive tests for transChange functionality
- Updated example app to demonstrate italicized text support with toggle switch
Example Usage #
// Check if a segment is added text (typically italicized)
for (final segment in verse.segments ?? []) {
if (segment.isAdded) {
// Render in italics
print('Italic: ${segment.text}');
} else {
print('Normal: ${segment.text}');
}
}
0.2.1 iOS Compatibility Fix #
0.2.0+1 Example App Update #
Changed #
- Updated example app to demonstrate red-letter Bible feature
- Added toggle switch to enable/disable red-letter display
- Jesus' words are now visually indicated with
[JESUS: ...]markers
0.2.0 Red-Letter Bible Support #
Added #
- Red-letter Bible support for OSIS and USFX formats
- New
TextSegmentclass for styled text segments with attributes segmentsfield inVerseclass for tracking speaker information and other attributes- Support for
<q who="Jesus">tags in OSIS XML to identify Jesus' words - Support for
<wj>(Words of Jesus) tags in USFX XML hasJesusWordsconvenience getter onVerseclass
- New
- Database persistence for segments
- New
verse_segmentstable for storing text segments - Automatic segment loading when retrieving verses from database
- Database version upgraded to 2 with migration support
- New
- Extensible design allows future support for other XML styling tags (italics, notes, poetry, etc.)
- Exported parser classes (
OsisParser,UsfxParser,ZefaniaParser) for direct use
Changed #
- OSIS parser now tracks quote tags and speaker attributes
- USFX parser now tracks wj tags and speaker attributes
Verseclass is backward compatible - existing code continues to workBibleRepositorynow persists and retrieves segments automatically- Database schema updated with proper foreign key constraints and indexes
Documentation #
- Added comprehensive design document at
/doc/red-letter-bible-support.md
Testing #
- Added 5 tests for OSIS red-letter parsing
- Added 5 tests for USFX red-letter parsing
- Added 5 tests for database segment persistence
- Added 29 tests for TextSegment serialization
- Added 1 test for cross-platform database support
- All 65 tests passing
0.1.0+4 Bug Fixes in USFX parser #
Bug Fixes #
- Fixed handling of footnotes and cross-references in USFX parser
0.1.0+3 Bug fixes and performance improvements #
Bug Fixes #
- Fixed USFX parser to properly handle chapter endings and ensure all chapters are added to books
- Fixed database handling in BibleRepository with proper null safety
Improvements #
- Enhanced BibleRepository with better database initialization and connection management
- Improved database operations with proper transaction handling and batch processing
- Added explicit database naming for better multi-Bible support
- Removed unused code and dependencies
0.1.0+2 Bug fix and documentation updates #
0.1.0+1 Bug fix and documentation updates #
0.1.0 Initial Release #
Features #
- Support for multiple Bible XML formats:
- OSIS (Open Scripture Information Standard)
- USFX (Unified Scripture Format XML)
- ZXBML (Zefania XML Bible Markup Language)
- Automatic format detection
- Memory-efficient XML parsing using proper async streams
- Production-ready with proper error handling and no debug statements
Bible Repository Features #
- SQLite database caching for improved performance
- Methods to retrieve books, chapters, and verses
- Verse retrieval by book and chapter
- Text search functionality across verses
Example App #
- Demonstrates both direct parsing and database approaches
- UI for selecting between different Bible formats
- Book and chapter selection interface
- Verse display with proper formatting and scrolling
- Search functionality for finding verses containing specific text