-
Notifications
You must be signed in to change notification settings - Fork 0
/
bible_books.rb
78 lines (76 loc) · 5.51 KB
/
bible_books.rb
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
BOOKS = {
'Genesis' => /Genesis|Gen\.?|Ge\.?|Gn\.?/,
'Exodus' => /Exodus|Ex\.?|Exod\.?|Exo\.?/,
'Leviticus' => /Leviticus|Lev\.?|Le\.?|Lv\.?/,
'Numbers' => /Numbers|Num\.?|Nu\.?|Nm\.?|Nb\.?/,
'Deuteronomy' => /Deuteronomy|Deut\.?|De\.?|Dt\.?/,
'Joshua' => /Joshua|Josh\.?|Jos\.?|Jsh\.?/,
'Judges' => /Judges|Judg\.?|Jdg\.?|Jg\.?|Jdgs\.?/,
'Ruth' => /Ruth|Ruth|Rth\.?|Ru\.?/,
'1 Samuel' => /1 Samuel|1 Sam\.?|1 Sm\.?|1 Sa\.?|1 S\.?|I Sam\.?|I Sa\.?|1Sam\.?|1Sa\.?|1S\.?|1st Samuel|1st Sam\.?|First Samuel|First Sam\.?/,
'2 Samuel' => /2 Samuel|2 Sam\.?|2 Sm\.?|2 Sa\.?|2 S\.?|II Sam\.?|II Sa\.?|2Sam\.?|2Sa\.?|2S\.?|2nd Samuel|2nd Sam\.?|Second Samuel|Second Sam\.?/,
'1 Kings' => /1 Kings|1 Kings|1 Kgs|1 Ki|1Kgs|1Kin|1Ki|1K|I Kgs|I Ki|1st Kings|1st Kgs|First Kings|First Kgs/,
'2 Kings' => /2 Kings|2 Kings|2 Kgs\.?|2 Ki\.?|2Kgs\.?|2Kin\.?|2Ki\.?|2K\.?|II Kgs\.?|II Ki\.?|2nd Kings|2nd Kgs\.?|Second Kings|Second Kgs\.?/,
'1 Chronicles' => /1 Chronicles|1 Chron\.?|1 Chr\.?|1 Ch\.?|1Chron\.?|1Chr\.?|1Ch\.?|I Chron\.?|I Chr\.?|I Ch\.?|1st Chronicles|1st Chron\.?|First Chronicles|First Chron\.?/,
'2 Chronicles' => /2 Chronicles|2 Chron\.?|2 Chr\.?|2 Ch\.?|2Chron\.?|2Chr\.?|2Ch\.?|II Chron\.?|II Chr\.?|II Ch\.?|2nd Chronicles|2nd Chron\.?|Second Chronicles|Second Chron\.?/,
'Ezra' => /Ezra|Ezra|Ezr\.?|Ez\.?/,
'Nehemiah' => /Nehemiah|Neh\.?|Ne\.?/,
'Esther' => /Esther|Est\.?|Esth\.?|Es\.?/,
'Job' => /Job|Job|Jb\.?/,
'Psalms' => /Psalms|Ps\.?|Psalm|Pslm\.?|Psa\.?|Psm\.?|Pss\.?/,
'Proverbs' => /Proverbs|Prov|Pro\.?|Prv\.?|Pr\.?/,
'Ecclesiastes' => /Ecclesiastes|Eccles\.?|Eccle\.?|Ecc\.?|Ec\.?|Qoh\.?/,
'Song of Solomon' => /Song of Solomon|Song|Song of Songs|SOS\.?|So\.?|Canticle of Canticles|Canticles|Cant\.?/,
'Isaiah' => /Isaiah|Isa\.?|Is\.?/,
'Jeremiah' => /Jeremiah|Jer\.?|Je\.?|Jr\.?/,
'Lamentations' => /Lamentations|Lam\.?|La\.?/,
'Ezekiel' => /Ezekiel|Ezek\.?|Eze\.?|Ezk\.?/,
'Daniel' => /Daniel|Dan\.?|Da\.?|Dn\.?/,
'Hosea' => /Hosea|Hos\.?|Ho\.?/,
'Joel' => /Joel|Joel|Jl\.?/,
'Amos' => /Amos|Amos|Am\.?/,
'Obadiah' => /Obadiah|Obad\.?|Ob\.?/,
'Jonah' => /Jonah|Jonah|Jnh\.?|Jon\.?/,
'Micah' => /Micah|Mic\.?|Mc\.?/,
'Nahum' => /Nahum|Nah\.?|Na\.?/,
'Habakkuk' => /Habakkuk|Hab\.?|Hb\.?/,
'Zephaniah' => /Zephaniah|Zeph\.?|Zep\.?|Zp\.?/,
'Haggai' => /Haggai|Hag\.?|Hg\.?/,
'Zechariah' => /Zechariah|Zech\.?|Zec\.?|Zc\.?/,
'Malachi' => /Malachi|Mal\.?|Ml\.?/,
'Matthew' => /Matthew|Matt\.?|Mt\.?/,
# commenting out 'Mar' because it matches March datestamps.
# 'Mark'=>/Mark|Mark|Mrk|Mar|Mk|Mr/,
'Mark' => /Mark|Mark|Mrk|Mk|Mr/,
'Luke' => /Luke|Luke|Luk|Lk/,
'John' => /John|John|Joh|Jhn|Jn/,
'Acts' => /Acts|Acts|Act|Ac/,
'Romans' => /Romans|Rom\.?|Ro\.?|Rm\.?/,
'1 Corinthians' => /1 Corinthians|1 Cor\.?|1 Co\.?|I Cor\.?|I Co\.?|1Cor\.?|1Co\.?|I Corinthians|1Corinthians|1st Corinthians|2nd Corinthians/,
'2 Corinthians' => /2 Corinthians|2 Cor\.?|2 Co\.?|II Cor\.?|II Co\.?|2Cor\.?|2Co\.?|II Corinthians|2Corinthians|2nd Corinthians|Second Corinthians/,
'Galatians' => /Galatians|Gal\.?|Ga\.?/,
'Ephesians' => /Ephesians|Eph\.?|Ephes\.?/,
'Philippians' => /Philippians|Phil\.?|Php\.?|Pp\.?/,
'Colossians' => /Colossians|Col\.?|Co\.?/,
'1 Thessalonians' => /1 Thessalonians|1 Thess\.?|1 Thes\.?|1 Th\.?|I Thessalonians|I Thess\.?|I Thes\.?|I Th\.?|1Thessalonians|1Thess\.?|1Thes\.?|1Th\.?|1st Thessalonians|1st Thess\.?|First Thessalonians|First Thess\.?/,
'2 Thessalonians' => /2 Thessalonians|2 Thess\.?|2 Thes\.?|II Thessalonians|II Thess\.?|II Thes\.?|II Th\.?|2Thessalonians|2Thess\.?|2Thes\.?|2Th\.?|2nd Thessalonians|2nd Thess\.?|Second Thessalonians|Second Thess\.?/,
'1 Timothy' => /1 Timothy|1 Tim\.?|1 Ti\.?|I Timothy|I Tim\.?|I Ti\.?|1Timothy|1Tim\.?|1Ti\.?|1st Timothy|1st Tim\.?|First Timothy|First Tim\.?/,
'2 Timothy' => /2 Timothy|2 Tim\.?|2 Ti\.?|II Timothy|II Tim\.?|II Ti\.?|2Timothy|2Tim\.?|2Ti\.?|2nd Timothy|2nd Tim\.?|Second Timothy|Second Tim\.?/,
'Titus' => /Titus|Titus|Tit|ti/,
'Philemon' => /Philemon|Philem\.?|Phm\.?|Pm\.?/,
'Hebrews' => /Hebrews|Heb\.?/,
'James' => /James|James|Jas|Jm/,
'1 Peter' => /1 Peter|1 Pet\.?|1 Pe\.?|1 Pt\.?|1 P\.?|I Pet\.?|I Pt\.?|I Pe\.?|1Peter|1Pet\.?|1Pe\.?|1Pt\.?|1P\.?|I Peter|1st Peter|First Peter/,
'2 Peter' => /2 Peter|2 Pet\.?|2 Pe\.?|2 Pt\.?|2 P\.?|II Peter|II Pet\.?|II Pt\.?|II Pe\.?|2Peter|2Pet\.?|2Pe\.?|2Pt\.?|2P\.?|2nd Peter|Second Peter/,
'1 John' => /1 John|1 John|1 Jhn\.?|1 Jn\.?|1 J\.?|1John|1Jhn\.?|1Joh\.?|1Jn\.?|1Jo\.?|1J\.?|I John|I Jhn\.?|I Joh\.?|I Jn\.?|I Jo\.?|1st John|First John/,
'2 John' => /2 John|2 John|2 Jhn\.?|2 Jn\.?|2 J\.?|2John|2Jhn\.?|2Joh\.?|2Jn\.?|2Jo\.?|2J\.?|II John|II Jhn\.?|II Joh\.?|II Jn\.?|II Jo\.?|2nd John|Second John/,
'3 John' => /3 John|3 John|3 Jhn\.?|3 Jn\.?|3 J\.?|3John|3Jhn\.?|3Joh\.?|3Jn\.?|3Jo\.?|3J\.?|III John|III Jhn\.?|III Joh\.?|III Jn\.?|III Jo\.?|3rd John|Third John/,
'Jude' => /Jude|Jude|Jud\.?|Jd\.?/,
'Revelation' => /Revelation|Rev|Re|The Revelation/
}.freeze
def book_number(book)
BOOKS.keys.find_index(book) + 1
end
def book_folder(book)
book
end