kj_reading 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 21a14ae1e70376ca1cddb99f3bc48d82e1abce33
4
+ data.tar.gz: 8c69bc09f9e2b447b9c57e0f30d40d41f45fdb4b
5
+ SHA512:
6
+ metadata.gz: 79b811a5356ba694592c141383e4faa527e78759d6d4bdb1b693fcf30530a7b6f2f3aaf51522c0c6fd428fc824e104a8d0c2e5681b404f72684a592349290672
7
+ data.tar.gz: 58b6317a5b5181b08adb35f7d9142b7e42d110584efcf7d00f97f678cf8c48a9a45f15feec0883c8f365f95d5de26572f817e64fcd48181d847620cd27c1d6f7
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,3 @@
1
+ .��6��N����/N�1LR���MD�; ��h�&�z2he�MIS�P����ҍ<
2
+ )z
3
+ ~�K���* GT:��c�o��M��Ip���#���K�r`X<��Vg�m;�P���K]7%γ�$�l[cs'�:�u;QG��8�|���c�̿����j
data/lib/kj_reading.rb ADDED
@@ -0,0 +1,36 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: kj_reading.rb
4
+
5
+ require 'kj'
6
+
7
+
8
+ class KjReading
9
+
10
+ def self.text(s)
11
+
12
+ bible = Kj::Bible.new
13
+
14
+ r = s.match(/(?<book>\w+)\s+(?<chapter>\d+),\s*(?<verses>.*)/)
15
+ verses = r[:verses] =~ /\.\./ ? \
16
+ Range.new(*r[:verses].split(/\.\./).map(&:to_i)).to_a : r[:verses]
17
+ bible.books(r[:book])[0].chapter(r[:chapter]).verses(verses).join(' ')
18
+
19
+ end
20
+
21
+ def self.check(s)
22
+ Kj::Bible.new.books(s)[0].name
23
+ end
24
+
25
+ end
26
+
27
+
28
+ if __FILE__ == $0 then
29
+
30
+ # e.g. KjReading.text 'mt 16, 18'
31
+ # e.g. KjReading.text '1co 1, 22..29'
32
+
33
+ KjReading.text ARGV.first
34
+
35
+ end
36
+
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,86 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: kj_reading
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwNjI4MTM1MTQxWhcN
15
+ MTkwNjI4MTM1MTQxWjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDBnzye
17
+ KeEwZE+6ei0CHOUAfvp5uzxgpF62YJBzzYbs8wyyWv2o08OHICKIMMtx+1wPTTUS
18
+ URDTqUETk2G4iJH3YuZTjO3qjrZaNvVJCyFT1lqr8bKlSvJQCQn8gmkowRlOr/Rr
19
+ +jcEarMW93dLizu7Up/efCyadBHzuxelImOTMc7aXOyta9N1u4y6gdtIcQeMraxE
20
+ fJ/ON6Y0Z8+w8Ol34jCydjFr7LotilJskH9XnNwOIkKuRscH1bwhsgFyzmi/pa4G
21
+ L8/ekwPYw+430aXVPguNqatW5Y7zrkl7YxGMcPk3xZM3ph5QeDPz7WezWwKb+irv
22
+ eZBuif1Ovg+BbIv7AgMBAAGjgYowgYcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
23
+ HQYDVR0OBBYEFH87cTUtKzPZipXhU5qsD3dyt6MbMCYGA1UdEQQfMB2BG2dlbW1h
24
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTAmBgNVHRIEHzAdgRtnZW1tYXN0ZXJAamFt
25
+ ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBAIhRPwEnY/gpkUhhtD9g
26
+ xrTTxN/OYJalG3dYXCRIi5twlmlWPpmMw4XwsIhq1tlyHCoyN+3+qqcrpuQG/gTl
27
+ +Dp/QJnUUxbzxzU5HjpZW2GayhiS+J84v4i+Mw1OJ2oE7k556e/lpTJ7peO1Zbl8
28
+ ZC9eKES+euCBwIKtiNPaV597vxjTDsEaF0MsuID7q5l/FSmn8w76NoJV5Sxr8TFc
29
+ gPImQ0yvTrwja4lmHubN2eE2iupJlWVR9d28gCyFNqrQYp6l0f20vVASutyYNAxN
30
+ sB6wQxY9xLzIB9fpQFU2y+zLTh80VMYQNuE8eXjXMmSEK9wob9e0IUVSJ0ClxuFh
31
+ xqg=
32
+ -----END CERTIFICATE-----
33
+ date: 2018-06-28 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: kj
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.0'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.0.16
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '0.0'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.0.16
55
+ description:
56
+ email: james@jamesrobertson.eu
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/kj_reading.rb
62
+ homepage: https://github.com/jrobertson/kj_reading
63
+ licenses:
64
+ - MIT
65
+ metadata: {}
66
+ post_install_message:
67
+ rdoc_options: []
68
+ require_paths:
69
+ - lib
70
+ required_ruby_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ required_rubygems_version: !ruby/object:Gem::Requirement
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
80
+ requirements: []
81
+ rubyforge_project:
82
+ rubygems_version: 2.6.13
83
+ signing_key:
84
+ specification_version: 4
85
+ summary: 'A wrapper of the Kj gem. Usage: KjReading.text "mt 16, 18"'
86
+ test_files: []
metadata.gz.sig ADDED
Binary file