forked from openlp/openlp
Bible Manager test code
bzr-revno: 27
This commit is contained in:
parent
e5ef08ee56
commit
c6e8330f9d
0
openlp/database/test/__init__.py
Normal file
0
openlp/database/test/__init__.py
Normal file
9
openlp/database/test/biblebooks_msg_short.csv
Normal file
9
openlp/database/test/biblebooks_msg_short.csv
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
1,1,"Genesis","GEN"
|
||||||
|
2,1,"Exodus","EXOD"
|
||||||
|
3,1,"Leviticus","LEV"
|
||||||
|
4,1,"Numbers","NUM"
|
||||||
|
5,1,"Deuteronomy","DEUT"
|
||||||
|
47,2,"Matthew","MATT"
|
||||||
|
48,2,"Mark","MARK"
|
||||||
|
49,2,"Luke","LUKE"
|
||||||
|
50,2,"John","JOHN"
|
|
40
openlp/database/test/bibleverses_msg_short.csv
Normal file
40
openlp/database/test/bibleverses_msg_short.csv
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
"Genesis",1,1,"First this: God created the Heavens and Earth - all you see, all you don't see."
|
||||||
|
"Genesis",1,2,"Earth was a soup of nothingness, a bottomless emptiness, an inky blackness. God's Spirit brooded like a bird above the watery abyss."
|
||||||
|
"Exodus",1,1,"These are the names of the Israelites who went to Egypt with Jacob, each bringing his family members:"
|
||||||
|
"Exodus",1,2,"Reuben, Simeon, Levi, and Judah,"
|
||||||
|
"Exodus",2,1,"A man from the family of Levi married a Levite woman."
|
||||||
|
"Exodus",2,2,"The woman became pregnant and had a son. She saw there was something special about him and hid him. She hid him for three months."
|
||||||
|
"Leviticus",1,1,"God called Moses and spoke to him from the Tent of Meeting:"
|
||||||
|
"Leviticus",1,2,"""Speak to the People of Israel. Tell them, When anyone presents an offering to God, present an animal from either the herd or the flock."
|
||||||
|
"Leviticus",1,3,"""If the offering is a Whole-Burnt-Offering from the herd, present a male without a defect at the entrance to the Tent of Meeting that it may be accepted by God."
|
||||||
|
"Numbers",1,1,"God spoke to Moses in the Wilderness of Sinai at the Tent of Meeting on the first day of the second month in the second year after they had left Egypt. He said,"
|
||||||
|
"Numbers",1,2,"""Number the congregation of the People of Israel by clans and families, writing down the names of every male."
|
||||||
|
"Numbers",3,1,"This is the family tree of Aaron and Moses at the time God spoke with Moses on Mount Sinai."
|
||||||
|
"Numbers",3,2,"The names of the sons of Aaron: Nadab the firstborn, Abihu, Eleazar, and Ithamar -"
|
||||||
|
"Numbers",3,3,"anointed priests ordained to serve as priests."
|
||||||
|
"Matthew",1,1,"The family tree of Jesus Christ, David's son, Abraham's son:"
|
||||||
|
"Matthew",1,2,"Abraham had Isaac, Isaac had Jacob, Jacob had Judah and his brothers,"
|
||||||
|
"Matthew",1,3,"Judah had Perez and Zerah (the mother was Tamar), Perez had Hezron, Hezron had Aram,"
|
||||||
|
"Matthew",1,4,"Aram had Amminadab, Amminadab had Nahshon, Nahshon had Salmon,"
|
||||||
|
"Matthew",1,5,"Salmon had Boaz (his mother was Rahab), Boaz had Obed (Ruth was the mother), Obed had Jesse,"
|
||||||
|
"Matthew",1,6,"Jesse had David, and David became king. David had Solomon (Uriah's wife was the mother),"
|
||||||
|
"Matthew",1,7,"Solomon had Rehoboam, Rehoboam had Abijah, Abijah had Asa,"
|
||||||
|
"Matthew",1,8,"Asa had Jehoshaphat, Jehoshaphat had Joram, Joram had Uzziah,"
|
||||||
|
"Matthew",2,1,"After Jesus was born in Bethlehem village, Judah territory - this was during Herod's kingship - a band of scholars arrived in Jerusalem from the East."
|
||||||
|
"Matthew",2,2,"They asked around, ""Where can we find and pay homage to the newborn King of the Jews? We observed a star in the eastern sky that "Matthew",3,1,"While Jesus was living in the Galilean hills, John, called ""the Baptizer,"" was preaching in the desert country of Judea."
|
||||||
|
"Matthew",3,2,"His message was simple and austere, like his desert surroundings: ""Change your life. God's kingdom is here."""
|
||||||
|
"Matthew",3,3,"John and his message were authorized by Isaiah's prophecy: Thunder in the desert! Prepare for God's arrival! Make the road smooth and straight!"
|
||||||
|
"Mark",1,1,"The good news of Jesus Christ - the Message! - begins here,"
|
||||||
|
"Mark",1,2,"following to the letter the scroll of the prophet Isaiah. Watch closely: I'm sending my preacher ahead of you; He'll make the road smooth for you."
|
||||||
|
"Mark",1,3,"Thunder in the desert! Prepare for God's arrival! Make the road smooth and straight!"
|
||||||
|
"Mark",5,1,"They arrived on the other side of the sea in the country of the Gerasenes."
|
||||||
|
"Mark",5,2,"As Jesus got out of the boat, a madman from the cemetery came up to him."
|
||||||
|
"Luke",1,1,"So many others have tried their hand at putting together a story of the wonderful harvest of Scripture and history that took place among us,"
|
||||||
|
"Luke",1,2,"using reports handed down by the original eyewitnesses who served this Word with their very lives."
|
||||||
|
"Luke",1,3,"Since I have investigated all the reports in close detail, starting from the story's beginning, I decided to write it all out for you, most honorable Theophilus,"
|
||||||
|
"John",1,1,"The Word was first, the Word present to God, God present to the Word. The Word was God,"
|
||||||
|
"John",1,2,"in readiness for God from day one."
|
||||||
|
"John",1,3,"Everything was created through him; nothing - not one thing! - came into being without him."
|
||||||
|
"John",2,1,"Three days later there was a wedding in the village of Cana in Galilee. Jesus' mother was there."
|
||||||
|
"John",2,2,"Jesus and his disciples were guests also."
|
||||||
|
"John",2,3,"When they started running low on wine at the wedding banquet, Jesus' mother told him, ""They're just about out of wine."""
|
Can't render this file because it contains an unexpected character in line 24 and column 146.
|
21
openlp/database/test/testBibleManager.py
Normal file
21
openlp/database/test/testBibleManager.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import os, os.path
|
||||||
|
import sys
|
||||||
|
mypath=os.path.split(os.path.abspath(__file__))[0]
|
||||||
|
sys.path.insert(0,(os.path.join(mypath, '..', '..','..')))
|
||||||
|
|
||||||
|
from openlp.database.BibleManager import *
|
||||||
|
|
||||||
|
bm = BibleManager()
|
||||||
|
print bm.getBibles()
|
||||||
|
b = bm.getBibles()
|
||||||
|
for b1 in b:
|
||||||
|
print b1
|
||||||
|
print bm.getBibleBooks("NIV")
|
||||||
|
c = bm.getBibleBooks("NIV")
|
||||||
|
for c1 in c:
|
||||||
|
print c1
|
||||||
|
print bm.getBookVerseCount("NIV", "GEN", 1)
|
||||||
|
print bm.getVerseText("NIV", "GEN",1,1,1)
|
||||||
|
c = bm.getVerseText("NIV","GEN",1,2,1)
|
||||||
|
for c1 in c:
|
||||||
|
print c1
|
Loading…
Reference in New Issue
Block a user