Giter Club home page Giter Club logo

bible's Introduction

= Introduction

This library provides tools to parse Bible references, look them up on the web (in a variety of translations) and to display them in an interactive console session.

= Interactive Use

To use the library as-is, run the included "bible" command. Enter a verse at the prompt and its corresponding text will be displayed. By default, the Revised Standard Version translation is used. The Douay-Rheims and New American Bible translations are also available.

If a reference is instead provided to the script, the interactive console will not be shown. Instead, the corresponding text will be looked up and printed.
 
== Windows Only Features

If the 'win32console' gem is available, the interactive console will print verses with bolded book and chapter headings. If the gem is not available, or the console is not being run on a Win32 system, those features will not be used.

= Library Design

The easiest way to use the library is through the Bible module. If 'bible' is required:

  require 'bible'
  
Then the Bible module gets an index method ('[]') added which can take a reference string and a lookup. It will return an iterator that can produce the text of the reference.

The reference returned also allows access to the individual books, chapters, and/or verses that might be contained. The methods available on the object are dependent on the type of reference parsed. For example, if multiple books were inlclude, the a "books" method is available. Otherwise, only a "book" method is available. This design was inspired by Martin Fowler's post "Humane Interfaces" (http://www.martinfowler.com/bliki/HumaneInterface.html). The "test_bible.rb" file in the "test" directory contains a wide variety of reference forms and corresponding tests of the methods available.

= Limitations

The library is not able to handle the different book and numbering schemes in widely differing bibles very well. Instead, it uses a very broad definition of the Bible to internally parse references given.

= Acknowledgements

Of course, my thanks to Matz for creating Ruby. What a joy it is to program in. I'm also indebted to the fine coders of the "commandline" and "highline" libraries. Finally, my thanks to the King of Kings, Jesus Christ, for the gift of this life. Amen.


bible's People

Contributors

m4dc4p avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.