Not fully working

This commit is contained in:
boose_magoose 2023-12-13 12:06:04 -05:00
parent cc53817dd8
commit 72511e8c4c

41
main.py
View File

@ -22,11 +22,11 @@ logger.add('log.txt', level='WARNING')
convert = dict([ convert = dict([
("Eccl", "Ecclesiastes"), ("Eccl", "Ecclesiastes"),
("Rom", "Romans"), ("Rom", "Romans"),
("2Tim", "2 Timothy"), ("2Tim", "2Timothy"),
("2Pet", "2 Peter"), ("2Pet", "2Peter"),
("Gen", "Genesis"), ("Gen", "Genesis"),
("John", "John"), ("John", "John"),
("1Cor", "1 Corinthians"), ("1Cor", "1Corinthians"),
("Ezek", "Ezekiel"), ("Ezek", "Ezekiel"),
("Heb", "Hebrews"), ("Heb", "Hebrews"),
("Rev", "Revelation"), ("Rev", "Revelation"),
@ -36,9 +36,9 @@ convert = dict([
("Acts", "Acts"), ("Acts", "Acts"),
("Deut", "Deuteronomy"), ("Deut", "Deuteronomy"),
("Neh", "Nehemiah"), ("Neh", "Nehemiah"),
("1Chr", "1 Chronicles"), ("1Chr", "1Chronicles"),
("2Kgs", "2 Kings"), ("2Kgs", "2Kings"),
("2Cor", "2 Corinthians"), ("2Cor", "2Corinthians"),
("Hos", "Hosea"), ("Hos", "Hosea"),
("Exod", "Exodus"), ("Exod", "Exodus"),
("Matt", "Matthew"), ("Matt", "Matthew"),
@ -46,9 +46,9 @@ convert = dict([
("Prov", "Proverbs"), ("Prov", "Proverbs"),
("Col", "Colossians"), ("Col", "Colossians"),
("Jer", "Jeremiah"), ("Jer", "Jeremiah"),
("1John", "1 John"), ("1John", "1John"),
("Jas", "James"), ("Jas", "James"),
("1Tim", "1 Timothy"), ("1Tim", "1Timothy"),
("Amos", "Amos"), ("Amos", "Amos"),
("Mic", "Micah"), ("Mic", "Micah"),
("Dan", "Daniel"), ("Dan", "Daniel"),
@ -58,40 +58,36 @@ convert = dict([
("Zech", "Zechariah"), ("Zech", "Zechariah"),
("Phil", "Philippians"), ("Phil", "Philippians"),
("Mark", "Mark"), ("Mark", "Mark"),
("2Thess", "2 Thessalonians"), ("2Thess", "2Thessalonians"),
("Jude", "Jude"), ("Jude", "Jude"),
("1Sam", "1 Samuel"), ("1Sam", "1Samuel"),
("Num", "Numbers"), ("Num", "Numbers"),
("Gal", "Galatians"), ("Gal", "Galatians"),
("1Pet", "1 Peter"), ("1Pet", "1Peter"),
("Lev", "Leviticus"), ("Lev", "Leviticus"),
("2Chr", "2 Chronicles"), ("2Chr", "2Chronicles"),
("Lam", "Lamentations"), ("Lam", "Lamentations"),
("1Kgs", "1 Kings"), ("1Kgs", "1Kings"),
("Ezra", "Ezra"), ("Ezra", "Ezra"),
("Obad", "Obadiah"), ("Obad", "Obadiah"),
("Hab", "Habakkuk"), ("Hab", "Habakkuk"),
("2Sam", "2 Samuel"), ("2Sam", "2Samuel"),
("Josh", "Joshua"), ("Josh", "Joshua"),
("Judg", "Judges"), ("Judg", "Judges"),
("Ruth", "Ruth"), ("Ruth", "Ruth"),
("Esth", "Esther"), ("Esth", "Esther"),
("Phlm", "Philemon"), ("Phlm", "Philemon"),
("1Thess", "1 Thessalonians"), ("1Thess", "1Thessalonians"),
("Joel", "Joel"), ("Joel", "Joel"),
("Titus", "Titus"), ("Titus", "Titus"),
("3John", "3 John"), ("3John", "3John"),
("Zeph", "Zephaniah"), ("Zeph", "Zephaniah"),
("Song", "Song of Songs"), ("Song", "Song of Songs"),
("Hag", "Haggai"), ("Hag", "Haggai"),
("Wis", "Wisdom of Solomon"), ("2John", "2John"),
("2John", "2 John"),
("2Macc", "2 Maccabees"),
("Nah", "Nahum"), ("Nah", "Nahum"),
("Sir", "Ecclesiasticus"),
("Psa", "Psalms"), ("Psa", "Psalms"),
("1Macc", "1 Maccabees"), ("2Peter", "2Peter")
("2Peter", "2 Peter"),
] ]
) )
@ -396,6 +392,7 @@ class MyHTMLParser(HTMLParser):
# Need this do the regex in self.clean does not pick # Need this do the regex in self.clean does not pick
# this up. Will be also cleaned in the same function. # this up. Will be also cleaned in the same function.
self.write_to_file('Passage: ') self.write_to_file('Passage: ')
if self.tag_type == 'end': if self.tag_type == 'end':
self.write_to_file('\n\n') self.write_to_file('\n\n')