-
Notifications
You must be signed in to change notification settings - Fork 4
/
demo.py
48 lines (40 loc) · 1.29 KB
/
demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# ------------------------------------------------------------------------------
# Easy mode
# ------------------------------------------------------------------------------
from freebible import bibles
# Quote everything
bibles.print("Gen")
bibles.print("Gen", 1)
bibles.print("Gen", 1, 1)
# Quote from a specific bible
bibles.kougo.quote("John") # this returns a book object
bibles.kougo.quote("John", 1) # this returns a chapter object
bibles.kougo.quote("John", 1, 1) # this returns a verse object
bibles.web.quote("John")
bibles.web.quote("John", 1)
bibles.web.quote("John", 1, 1)
# ------------------------------------------------------------------------------
# Advanced access
# ------------------------------------------------------------------------------
from freebible import read_kougo, read_web
kougo = read_kougo()
print("Japanese Colloquial Bible - 口語訳")
print("-" * 20)
kougo.summarise()
print()
# Demo reading WEB
print("World English Bible")
print("-" * 20)
web = read_web()
web.summarise()
print()
# demo quoting
kg_john = kougo['John']
print("Kougo\\{}: {} chapters".format(kg_john, len(kg_john)))
web_john = web['John']
print("WEB\\{}: {} chapters".format(web_john, len(web_john)))
print()
print("Quoting bibles")
print("-" * 20)
print(web['John'][1][1])
print(kougo['John'][1][1])