프로젝트
GitHub에서 보기
seven1m/bible_api
소개
오픈 성경과 퍼블릭 도메인 성경을 JSON API로 제공하는 Ruby 웹 앱
웹 및 앱 개발측정된 스타 증가
- in 24h
- -1
- in 7 days
- 0
- in 15 days
- +2
- in 1 month
- 업데이트 지연
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalbible_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:
Clone the repo:
git clone https://github.com/seven1m/bible_api cd bible_api git submodule update --initInstall the dependencies:
gem install bundler bundle config --local deployment true # optional, but preferred on a server bundle installCreate 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.rbHost the app with Passenger
... or run
bundle exec ruby app.rbif you are just testing.
Copyright
Copyright Tim Morgan. Licensed under The MIT License (MIT). See LICENSE for more info.
관련 프로젝트 살펴보기
불러오는 중…