biblereference 1.0.0 copy "biblereference: ^1.0.0" to clipboard
biblereference: ^1.0.0 copied to clipboard

A dart library to parse text into bible references in multiple locales.

biblereference #

A dart library to parse text into bible references in multiple locales.

Getting started #

Install the biblereference package:

dependencies:
  biblereference: ^1.0.0

Then you can import it in your Dart code:

import 'package:biblereference/biblereference.dart';

Features #

Supported String Formats #

  • Book (e.g. Genesis)
  • Book Chapter (e.g. Genesis 1)
  • Book Chapter-Chapter (e.g. Genesis 1-2)
  • Book Chapter:Verse (e.g. Genesis 1:1)
  • Book Chapter:Verse-Verse (e.g. Genesis 1:1-5)
  • Book Chapter:Verse,Verse (e.g. Genesis 1:1,5)
  • Book Chapter:Verse-Verse,Verse-Verse (e.g. Genesis 1:1-5,8-10)
  • Book Chapter:Verse-Verse;Chapter:Verse-Verse (e.g. Genesis 1:1-5;2:1-3)
  • Book Chapter:Verse-Chapter:Verse (e.g. Genesis 1:5-2:3)
  • Book Verse (for single-chapter books) (e.g. 2 John 9)

Supported Locales #

  • English: AppLocale.en
  • Tagalog: AppLocale.tgl

Usage #

You can use the BibleReferenceParser() singleton to parse.

final reference = BibleReferenceParser().parse('Genesis 1:1-5;2:1-3');
print(reference ==
    Reference(
      BibleBook.genesis,
      segments: [
        ReferenceSegment.multipleVerses(1, 1, 5),
        ReferenceSegment.multipleVerses(2, 1, 3),
      ],
    )); // prints true

Support #

If you like my work and want to support me, buying me a coffee would be awesome! Thanks for your support!

Buy Me A Coffee


Mark Ivan BastoGitHub @MarkIvanDevTwitter @Rivolvan_Speaks

3
likes
160
pub points
0%
popularity

Publisher

verified publishermarkivan.dev

A dart library to parse text into bible references in multiple locales.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

biblebooks

More

Packages that depend on biblereference