Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Free holy bibles data and toolkit for Python developers

License

NotificationsYou must be signed in to change notification settings

neocl/freebible

Repository files navigation

Free holy bibles data and toolkit for Python developers

Project Home Page

https://github.com/neocl/freebible

Installation

freebible package is available on PyPI, so it can be installed via pip by using

pip install freebible# or even betterpython3 -m pip install freebible

Please note that freebible requiresPython 3. It does not work onPython 2 anymore.

Sample code

Easy access

>>>fromfreebibleimportbibles# Quote everything>>>bibles.print("Gen")[1]創世記[1]Genesis>>>bibles.print("Gen",1,1)[Ge1:1]元始に神天地を創造たまへり [Gen1:1]InthebeginningGodcreatedtheheavensandtheearth.# Quote from a specific bible>>>bibles.kougo.quote("John")# this returns a book objectBook(ID='104',title='ヨハネ傳福音書',filename='John',title_eng='John',short_name='John')>>>bibles.kougo.quote("John",1)# this returns a chapter objectChapter(ID='1')>>>bibles.kougo.quote("John",1,1)# this returns a verse objectJohn1:1太初に言あり言は神と偕にあり言は神なりき>>>bibles.web.quote("John")Book(ID='43',title='John',filename='',title_eng='John',short_name='John')>>>bibles.web.quote("John",1)Chapter(ID='1')>>>bibles.web.quote("John",1,1)John1:1InthebeginningwastheWord,andtheWordwaswithGod,andtheWordwasGod.

Accessing Kougo

>>>fromfreebibleimportread_kougo>>>kougo=read_kougo()>>>print(len(kougo))66>>>print(kougo['John'])[104]ヨハネ傳福音書>>>print(len(kougo['John']))21>>>print(kougo['John'][1])Chapter(ID='1')>>>print(kougo['John'][1][1])[John1:1]太初に言あり言は神と偕にあり言は神なりき

Accessing World English Bible (WEB)

>>>fromfreebibleimportread_web>>>web=read_web()>>>print(len(web))66>>>print(web['John'])[43]John>>>print(len(web['John']))21>>>print(web['John'][1])Chapter(ID='1')>>>print(len(web['John'][1]))51>>>print(web['John'][1][1])[John1:1]InthebeginningwastheWord,andtheWordwaswithGod,andtheWordwasGod.

Developer setup

If you want to contribute to the source code, you can setup the development environment like this

# Create a virtual environment to install packagespython3 -venv~/.envfreebible# Activate the virtual environment.~/.envfreebible/bin/activate# Check out the source code to your machinegit clone https://github.com/freebible freebible-projectcd freebible-project# Install required packagespython3 -m pip install -r requirements.txt# Run the demo to make sure that this source code workpython3 demo.py

Bible sources:

Japanese Colloquial 口語訳:http://jco.ibibles.net/

World English Bible:https://github.com/scrollmapper/bible_databases


[8]ページ先頭

©2009-2025 Movatter.jp