bible = dict()
books = list()
with open("kjv.atv") as bible_file:
for line in bible_file:
line = line.rstrip()
parts = line.split("@")
book = parts[0]
reference = parts[1]
verse_text = parts[2]
parts = reference.split(":")
chapter = int(parts[0])
verse = int(parts[1])
if book in bible:
book_chapters = bible[book]
else:
book_chapters = list()
bible[book] = book_chapters
books.append(book)
if len(book_chapters) >= chapter:
book_chapters[chapter-1].append(verse_text)
else:
book_chapters.append([verse_text])
abbreviations = {
"Ge": "Genesis",
"Exo" : "Exodus",
"Lev": "Leviticus",
"Num" : "Numbers",
"Deu":"Deuteronomy",
"Josh": "Joshua",
"Jdgs": "Judges",
"Ruth": "Ruth",
"1Sm": "1st Samuel",
"2Sm": "2nd Samuel",
"1Ki": "1st Kings",
"2Ki": "2nd Kings",
"1Chr": "1st Chronicles",
"2Chr": "2nd Chronicles",
"Ezra": "Ezra",
"Neh": "Nehemiah",
"Est": "Esther",
"Job": "Job",
"Psa": "Psalms",
"Prv": "Proverbs",
"Eccl": "Ecclesiastes",
"SSol": "Song of Solomon",
"Isa": "Isaiah",
"Jer": "Jeremiah",
"Lam": "Lamentations",
"Eze": "Ezekiel",
"Dan": "Daniel",
"Hos": "Hosea",
"Joel": "Joel",
"Amos": "Amos",
"Obad": "Obadiah",
"Jonah": "Jonah",
"Mic": "Micah",
"Nahum": "Nahum",
"Hab": "Habbakuk",
"Zep": "Zepheniah",
"Hag": "Haggai",
"Zec": "Zechariah",
"Mal": "Malachi",
'Mat': 'Matthew',
'Mark': 'Mark',
'Luke': 'Luke',
'John': 'John',
'Acts': 'Acts',
'Rom': 'Romans',
'1Cor': '1st Corinthians',
'2Cor': '2nd Corinthians',
'Gal': 'Galatians',
'Eph': 'Ephesians',
'Phi': 'Phillipians',
'Col': 'Colossians',
'1Th': '1st Thessalonians',
'2Th': '2nd Thessalonians',
'1Tim': '1st Timothy',
'2Tim': '2nd Timothy',
'Titus': 'Titus',
'Phmn': 'Philemon',
'Heb': 'Hebrews',
'Jas': 'James',
'1Pet': '1st Peter',
'2Pet': '2nd Peter',
'1Jn': '1st John',
'2Jn': '2nd John',
'3Jn': '3rd John',
'Jude': 'Jude',
'Rev': 'Revelation'
}