Providers a clean interface to common scripture providers, such as Crossways ESV and Bible Gateway.
Current (default) provider is BibleGatewayScraper, which pulls back scripture from Bible Gateway.
This is a work in progress and all feedback or collaboration is welcome.
A screen-scrape interface to Bible Gateway has been implemented and provides (by far) the most comprehensive list of translations available.
The Crossways ESV API provider is a work in progress on the crossways branch.
gem install scripture_lookup
require 'scripture_lookup'
Shortcut to bring back a BibleGatewayScraper instance:
provider = ScriptureLookup.new
Example usage - #to_s to pull back the text only:
response = provider.lookup("John 3:16", :NASB)
response.to_s
=> "\“For God so loved the world, that He gave His only begotten Son, that whoever believes in Him shall not perish, but have eternal life."
Example usage - #verses to pull back an array of verses
response = provider.lookup("1 Thess 5:16-18", :ESV)
response.verses
=> ["Rejoice always,",
"pray without ceasing,",
"give thanks in all circumstances; for this is the will of God in Christ Jesus for you."]
The ScriptureLookup::Response object also gives access to the full response data, by way of the #response_data accessor.
Installation of this gem includes a command line interface. To utilize, call "scripture