GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - greson719/bible_api: Ruby web app that serves JSON API for open and public domain bibles

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

194 Commits
194 Commits

Folders and files

NameName
Last commit message
Last commit date
bibles @ cf5da28
bibles @ cf5da28
 
 
config
config
 
 
spec
spec
 
 
views
views
 
 
.gitignore
.gitignore
 
 
.gitmodules
.gitmodules
 
 
.rspec
.rspec
 
 
.ruby-version
.ruby-version
 
 
.streerc
.streerc
 
 
DOKKU.md
DOKKU.md
 
 
Gemfile
Gemfile
 
 
Gemfile.lock
Gemfile.lock
 
 
LICENSE
LICENSE
 
 
Procfile
Procfile
 
 
README.md
README.md
 
 
Rakefile
Rakefile
 
 
app.json
app.json
 
 
app.rb
app.rb
 
 
config.ru
config.ru
 
 
import.rb
import.rb
 
 

Repository files navigation

bible_api

This is a Ruby web app that serves a JSON API for public domain and open bible translations.

Using It

This app is served from bible-api.com, which anyone can use.

With Curl and JQ

→ curl -s https://bible-api.com/John+3:16 | jq
{
  "reference": "John 3:16",
  "verses": [
    {
      "book_id": "JHN",
      "book_name": "John",
      "chapter": 3,
      "verse": 16,
      "text": "\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n"
    }
  ],
  "text": "\nFor God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n\n",
  "translation_id": "web",
  "translation_name": "World English Bible",
  "translation_note": "Public Domain"
}

With Ruby

→ ruby -r open-uri -r json -r pp -e "pp JSON.parse(URI.open('https://bible-api.com/John+3:16').read)"
{"reference"=>"John 3:16",
 "verses"=>
  [{"book_id"=>"JHN",
    "book_name"=>"John",
    "chapter"=>3,
    "verse"=>16,
    "text"=>
     "\n" +
     "For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n" +
     "\n"}],
 "text"=>
  "\n" +
  "For God so loved the world, that he gave his one and only Son, that whoever believes in him should not perish, but have eternal life.\n" +
  "\n",
 "translation_id"=>"web",
 "translation_name"=>"World English Bible",
 "translation_note"=>"Public Domain"}

Hosting it Yourself

If you want to host this application yourself, you'll need a Linux server with Ruby, Redis, and MySQL (or MariaDB) installed. Follow the steps below:

  1. Clone the repo:

    git clone https://github.com/seven1m/bible_api
    cd bible_api
    git submodule update --init
    
  2. Install the dependencies:

    gem install bundler
    bundle config --local deployment true # optional, but prefered on a server
    bundle install
    
  3. Create the database and import the translations:

    mysql -uroot -e "create database bible_api; grant all on bible_api.* to user@localhost identified by 'password';"
    export DATABASE_URL="mysql2://user:password@localhost/bible_api"
    export REDIS_URL="redis://localhost:6379"
    bundle exec ruby import.rb
    
  4. Host the app with Passenger

    ... or run bundle exec ruby app.rb if you are just testing.

Copyright

Copyright Tim Morgan. Licensed under The MIT License (MIT). See LICENSE for more info.

About

Ruby web app that serves JSON API for open and public domain bibles

bible-api.com

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.