bible_plus 0.1.1

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 70

Introduction

BiblePlus is a dart library to work with PDB bible files. It's heavily inspired by the bibleplus java library with improvement of implicit lazy loading and exception handling.

Example

See example/main.dart

import 'package:bible_plus/bible_plus.dart';

void main() {
  BiblePlus bible = new BiblePlus('/path/to/bible.pdb');
  try {
    bible.loadVersionInfo();
  } on Exception catch (e) {
    // Error
    print(e);
  }
  // At this point we can access some basic information,
  // such as the bible version name and version info.
  // We can also have the list of book names at this point.

  // Get the version name of the bible
  String versionName = bible.versionName;
  print(versionName); // => King James Version

  // Get the version info of the bible
  String versionInfo = bible.versionInfo;
  print(versionInfo);

  // Get the total number of books in the bible
  int bookCount = bible.totalBooks;
  print(bookCount); // => 66

  // Get the BibleBook object. The line below returns Genesis
  BibleBook bGen = bible.books[0];

  // Get the full name of the book
  String fullName = bGen.fullName;
  print(fullName); // => 'Genesis'

  // Get the shot name of the book
  String shortName = bGen.shortName;
  print(shortName); // => 'Gen'

  // Get the total number of chapters in the book
  int totalChapters = bGen.totalChapters;
  print(totalChapters); // => 50

  // Get the total number of verses in the chapter
  int chapter = 1;
  int totalVerses = bGen.getTotalVerses(chapter);
  print(totalVerses); // => 31

  // Get the verse text only
  int verse = 1;
  String verseText = bGen.getVerse(chapter, verse);
  print(verseText); // => 'In the beginning...'

  // Get the chapter title, or verse title, together with
  // the verse text. See the documentation of the return
  // value in BibleBook
  List<String> sb = bGen.getCompleteVerse(chapter, verse);
  print(sb.join('\n'));
  // => 'In the beginning...\n\nChapter 1\nGenesis'
}

API Doc

More detailed API documentation available here

0.1.1 2018-05-15

  • [Bug Fix] Fixed the implementation for reading byte shifted pdb.
  • [Bug Fix] Fixed the close bracket ascii code so that there's no more word separator before close bracket.

0.1.0 2018-05-04

  • First reviewed release

example/main.dart

import 'package:bible_plus/bible_plus.dart';

void main() {
  BiblePlus bible = new BiblePlus('/path/to/bible.pdb');
  try {
    bible.loadVersionInfo();
  } on Exception catch (e) {
    // Error
    print(e);
  }
  // At this point we can access some basic information,
  // such as the bible version name and version info.
  // We can also have the list of book names at this point.

  // Get the version name of the bible
  String versionName = bible.versionName;
  print(versionName); // => King James Version

  // Get the version info of the bible
  String versionInfo = bible.versionInfo;
  print(versionInfo);

  // Get the total number of books in the bible
  int bookCount = bible.totalBooks;
  print(bookCount); // => 66

  // Get the BibleBook object. The line below returns Genesis
  BibleBook bGen = bible.books[0];

  // Get the full name of the book
  String fullName = bGen.fullName;
  print(fullName); // => 'Genesis'

  // Get the shot name of the book
  String shortName = bGen.shortName;
  print(shortName); // => 'Gen'

  // Get the total number of chapters in the book
  int totalChapters = bGen.totalChapters;
  print(totalChapters); // => 50

  // Get the total number of verses in the chapter
  int chapter = 1;
  int totalVerses = bGen.getTotalVerses(chapter);
  print(totalVerses); // => 31

  // Get the verse text only
  int verse = 1;
  String verseText = bGen.getVerse(chapter, verse);
  print(verseText); // => 'In the beginning...'

  // Get the chapter title, or verse title, together with
  // the verse text. See the documentation of the return
  // value in BibleBook
  List<String> sb = bGen.getCompleteVerse(chapter, verse);
  print(sb.join('\n'));
  // => 'In the beginning...\n\nChapter 1\nGenesis'
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  bible_plus: "^0.1.1"

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


      import 'package:bible_plus/bible_plus.dart';
  
Version Uploaded Documentation Archive
0.1.1 May 15, 2018 Go to the documentation of bible_plus 0.1.1 Download bible_plus 0.1.1 archive
0.1.0 May 4, 2018 Go to the documentation of bible_plus 0.1.0 Download bible_plus 0.1.0 archive

Analysis

We analyzed this package on Jul 13, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0-dev.63.0
  • pana: 0.11.3

Scores

Popularity:
Describes how popular the package is relative to other packages. [more]
41 / 100
Health:
Code health derived from static analysis. [more]
99 / 100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100 / 100
Overall score:
Weighted score of the above. [more]
70
Learn more about scoring.

Platforms

Detected platforms: Flutter, other

Primary library: package:bible_plus/bible_plus.dart with components: io.

Suggestions

  • The description is too short.

    Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

  • Package is pre-v1 release.

    While there is nothing inherently wrong with versions of 0.*.*, it usually means that the author is still experimenting with the general direction API.

  • Fix analysis and formatting issues.

    Analysis or formatting checks reported 6 hints.

    Run dartfmt to format lib/src/bible_book.dart.

    Run dartfmt to format lib/src/bible_plus.dart.

    Similar analysis of the following files failed:

    • lib/src/pdb_access.dart (hint)
    • lib/src/pdb_file_stream.dart (hint)
    • lib/src/pdb_header.dart (hint)
    • lib/src/util.dart (hint)

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=1.23.0 <2.0.0
Dev dependencies
test ^0.12.34