kjdotxml 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +0 -0
  3. data/lib/kjdotxml.rb +108 -0
  4. data/xml/1-chronicles.xml +1002 -0
  5. data/xml/1-corinthians.xml +471 -0
  6. data/xml/1-john.xml +117 -0
  7. data/xml/1-kings.xml +862 -0
  8. data/xml/1-peter.xml +117 -0
  9. data/xml/1-samuel.xml +874 -0
  10. data/xml/1-thessalonians.xml +101 -0
  11. data/xml/1-timothy.xml +127 -0
  12. data/xml/2-chronicles.xml +896 -0
  13. data/xml/2-corinthians.xml +285 -0
  14. data/xml/2-john.xml +17 -0
  15. data/xml/2-kings.xml +771 -0
  16. data/xml/2-peter.xml +69 -0
  17. data/xml/2-samuel.xml +745 -0
  18. data/xml/2-thessalonians.xml +55 -0
  19. data/xml/2-timothy.xml +93 -0
  20. data/xml/3-john.xml +18 -0
  21. data/xml/acts.xml +1065 -0
  22. data/xml/amos.xml +166 -0
  23. data/xml/colossians.xml +105 -0
  24. data/xml/daniel.xml +383 -0
  25. data/xml/deuteronomy.xml +1029 -0
  26. data/xml/ecclesiastes.xml +248 -0
  27. data/xml/ephesians.xml +169 -0
  28. data/xml/esther.xml +189 -0
  29. data/xml/exodus.xml +1295 -0
  30. data/xml/ezekiel.xml +1371 -0
  31. data/xml/ezra.xml +302 -0
  32. data/xml/galatians.xml +163 -0
  33. data/xml/genesis.xml +1635 -0
  34. data/xml/habakkuk.xml +64 -0
  35. data/xml/haggai.xml +44 -0
  36. data/xml/hebrews.xml +331 -0
  37. data/xml/hosea.xml +227 -0
  38. data/xml/isaiah.xml +1426 -0
  39. data/xml/james.xml +120 -0
  40. data/xml/jeremiah.xml +1470 -0
  41. data/xml/job.xml +1156 -0
  42. data/xml/joel.xml +81 -0
  43. data/xml/john.xml +923 -0
  44. data/xml/jonah.xml +58 -0
  45. data/xml/joshua.xml +708 -0
  46. data/xml/jude.xml +29 -0
  47. data/xml/judges.xml +662 -0
  48. data/xml/lamentations.xml +166 -0
  49. data/xml/leviticus.xml +915 -0
  50. data/xml/luke.xml +1201 -0
  51. data/xml/malachi.xml +65 -0
  52. data/xml/mark.xml +712 -0
  53. data/xml/matthew.xml +1129 -0
  54. data/xml/micah.xml +121 -0
  55. data/xml/nahum.xml +55 -0
  56. data/xml/nehemiah.xml +434 -0
  57. data/xml/numbers.xml +1362 -0
  58. data/xml/obadiah.xml +25 -0
  59. data/xml/philemon.xml +29 -0
  60. data/xml/philippians.xml +114 -0
  61. data/xml/proverbs.xml +979 -0
  62. data/xml/psalms.xml +2763 -0
  63. data/xml/revelation.xml +450 -0
  64. data/xml/romans.xml +467 -0
  65. data/xml/ruth.xml +95 -0
  66. data/xml/song-of-solomon.xml +135 -0
  67. data/xml/td.xml +433 -0
  68. data/xml/titus.xml +54 -0
  69. data/xml/zechariah.xml +241 -0
  70. data/xml/zephaniah.xml +61 -0
  71. data.tar.gz.sig +2 -0
  72. metadata +158 -0
  73. 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
+