kjdotxml 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +0 -0
- data/lib/kjdotxml.rb +108 -0
- data/xml/1-chronicles.xml +1002 -0
- data/xml/1-corinthians.xml +471 -0
- data/xml/1-john.xml +117 -0
- data/xml/1-kings.xml +862 -0
- data/xml/1-peter.xml +117 -0
- data/xml/1-samuel.xml +874 -0
- data/xml/1-thessalonians.xml +101 -0
- data/xml/1-timothy.xml +127 -0
- data/xml/2-chronicles.xml +896 -0
- data/xml/2-corinthians.xml +285 -0
- data/xml/2-john.xml +17 -0
- data/xml/2-kings.xml +771 -0
- data/xml/2-peter.xml +69 -0
- data/xml/2-samuel.xml +745 -0
- data/xml/2-thessalonians.xml +55 -0
- data/xml/2-timothy.xml +93 -0
- data/xml/3-john.xml +18 -0
- data/xml/acts.xml +1065 -0
- data/xml/amos.xml +166 -0
- data/xml/colossians.xml +105 -0
- data/xml/daniel.xml +383 -0
- data/xml/deuteronomy.xml +1029 -0
- data/xml/ecclesiastes.xml +248 -0
- data/xml/ephesians.xml +169 -0
- data/xml/esther.xml +189 -0
- data/xml/exodus.xml +1295 -0
- data/xml/ezekiel.xml +1371 -0
- data/xml/ezra.xml +302 -0
- data/xml/galatians.xml +163 -0
- data/xml/genesis.xml +1635 -0
- data/xml/habakkuk.xml +64 -0
- data/xml/haggai.xml +44 -0
- data/xml/hebrews.xml +331 -0
- data/xml/hosea.xml +227 -0
- data/xml/isaiah.xml +1426 -0
- data/xml/james.xml +120 -0
- data/xml/jeremiah.xml +1470 -0
- data/xml/job.xml +1156 -0
- data/xml/joel.xml +81 -0
- data/xml/john.xml +923 -0
- data/xml/jonah.xml +58 -0
- data/xml/joshua.xml +708 -0
- data/xml/jude.xml +29 -0
- data/xml/judges.xml +662 -0
- data/xml/lamentations.xml +166 -0
- data/xml/leviticus.xml +915 -0
- data/xml/luke.xml +1201 -0
- data/xml/malachi.xml +65 -0
- data/xml/mark.xml +712 -0
- data/xml/matthew.xml +1129 -0
- data/xml/micah.xml +121 -0
- data/xml/nahum.xml +55 -0
- data/xml/nehemiah.xml +434 -0
- data/xml/numbers.xml +1362 -0
- data/xml/obadiah.xml +25 -0
- data/xml/philemon.xml +29 -0
- data/xml/philippians.xml +114 -0
- data/xml/proverbs.xml +979 -0
- data/xml/psalms.xml +2763 -0
- data/xml/revelation.xml +450 -0
- data/xml/romans.xml +467 -0
- data/xml/ruth.xml +95 -0
- data/xml/song-of-solomon.xml +135 -0
- data/xml/td.xml +433 -0
- data/xml/titus.xml +54 -0
- data/xml/zechariah.xml +241 -0
- data/xml/zephaniah.xml +61 -0
- data.tar.gz.sig +2 -0
- metadata +158 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 43d7cc198ac63a46bf55b75530fe491d38e5f9d9eca64b978306e9ea2c620be0
|
4
|
+
data.tar.gz: 83a52a86067eb60514f6a5db75a2a3235a85ac75a9b361accc5fe3407acf9bdf
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 9ec3954206fe6bd0d68b73e7e66bb8a55c17ff3c8496516c31c369387dfe0c2486ef2d9f4183b20ff711ed9d6f2af5b253cec2365eb26c092f8d546fe736613d
|
7
|
+
data.tar.gz: 7f0a74143b59223a689d7a8ac4d8663e0aaa20c6aaac0f9148d603f41584f2ebb25601736d27feedf3b93aec9945d7cd90176f75f0f1cecaf0a136cb81080fd2
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data/lib/kjdotxml.rb
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# file: kjdotxml.rb
|
4
|
+
|
5
|
+
require 'rexle'
|
6
|
+
|
7
|
+
|
8
|
+
BOOKS = [
|
9
|
+
"Genesis",
|
10
|
+
"Exodus",
|
11
|
+
"Leviticus",
|
12
|
+
"Numbers",
|
13
|
+
"Deuteronomy",
|
14
|
+
"Joshua",
|
15
|
+
"Judges",
|
16
|
+
"Ruth",
|
17
|
+
"1 Samuel",
|
18
|
+
"2 Samuel",
|
19
|
+
"1 Kings",
|
20
|
+
"2 Kings",
|
21
|
+
"1 Chronicles",
|
22
|
+
"2 Chronicles",
|
23
|
+
"Ezra",
|
24
|
+
"Nehemiah",
|
25
|
+
"Esther",
|
26
|
+
"Job",
|
27
|
+
"Psalms",
|
28
|
+
"Proverbs",
|
29
|
+
"Ecclesiastes",
|
30
|
+
"Song of Solomon",
|
31
|
+
"Isaiah",
|
32
|
+
"Jeremiah",
|
33
|
+
"Lamentations",
|
34
|
+
"Ezekiel",
|
35
|
+
"Daniel",
|
36
|
+
"Hosea",
|
37
|
+
"Joel",
|
38
|
+
"Amos",
|
39
|
+
"Obadiah",
|
40
|
+
"Jonah",
|
41
|
+
"Micah",
|
42
|
+
"Nahum",
|
43
|
+
"Habakkuk",
|
44
|
+
"Zephaniah",
|
45
|
+
"Haggai",
|
46
|
+
"Zechariah",
|
47
|
+
"Malachi",
|
48
|
+
"Matthew",
|
49
|
+
"Mark",
|
50
|
+
"Luke",
|
51
|
+
"John",
|
52
|
+
"Acts",
|
53
|
+
"Romans",
|
54
|
+
"1 Corinthians",
|
55
|
+
"2 Corinthians",
|
56
|
+
"Galatians",
|
57
|
+
"Ephesians",
|
58
|
+
"Philippians",
|
59
|
+
"Colossians",
|
60
|
+
"1 Thessalonians",
|
61
|
+
"2 Thessalonians",
|
62
|
+
"1 Timothy",
|
63
|
+
"2 Timothy",
|
64
|
+
"Titus",
|
65
|
+
"Philemon",
|
66
|
+
"Hebrews",
|
67
|
+
"James",
|
68
|
+
"1 Peter",
|
69
|
+
"2 Peter",
|
70
|
+
"1 John",
|
71
|
+
"2 John",
|
72
|
+
"3 John",
|
73
|
+
"Jude",
|
74
|
+
"Revelation"
|
75
|
+
]
|
76
|
+
|
77
|
+
class KjDotXmlError < Exception
|
78
|
+
end
|
79
|
+
|
80
|
+
class KjDotXml
|
81
|
+
|
82
|
+
def initialize()
|
83
|
+
end
|
84
|
+
|
85
|
+
def book(s)
|
86
|
+
|
87
|
+
#filepath = File.join('/tmp', s.downcase.gsub(/\s/,'-') + '.xml')
|
88
|
+
filename = s.downcase.gsub(/\s/,'-') + '.xml'
|
89
|
+
filepath = File.join(File.dirname(__FILE__), '..', 'xml', filename)
|
90
|
+
|
91
|
+
if File.exists? filepath then
|
92
|
+
|
93
|
+
contents = File.read(filepath)
|
94
|
+
Rexle.new(contents)
|
95
|
+
|
96
|
+
else
|
97
|
+
raise KjDotXmlError, 'book not found'
|
98
|
+
end
|
99
|
+
|
100
|
+
end
|
101
|
+
|
102
|
+
def books()
|
103
|
+
BOOKS
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
end
|
108
|
+
|