sqlbible 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sqlbible +4 -0
- data/lib/sqlbible/version.rb +1 -1
- data/lib/sqlbible.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '095b3bc9b6735cd1df572c88d96117b96a60ebfc2bd928c01d8ef1bf5b2c5881'
|
4
|
+
data.tar.gz: 2c9cd72e62e96e81bb210e1416c660e974a24fc17018edc8165b383c74e73083
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7abadece71c1c11a3fddf7d5949e78c507ca6b74d309030d15cdd840329b08fb40af572440e3fa36430604e66ad95e952e2e46b4f3305495c5031384a869ddc
|
7
|
+
data.tar.gz: 7c568ebde272045cba9b9f8b2a23a06d2d1b8ee381ca3abeb853e7b123beaeb1598ab6323ac485e8b59d5330545e9350189975f3c11d5092a97271c480f005eb
|
data/bin/sqlbible
CHANGED
@@ -12,6 +12,7 @@ result = OptimistXL.options do
|
|
12
12
|
opt :name, 'Name of the converted bible module or output filename of the generated .sqlbible file', type: String, required: true
|
13
13
|
opt :overwrite, 'Overwrite existing module or output file if exist', type: :Boolean, default: false
|
14
14
|
end
|
15
|
+
subcmd :list, 'Show a list of the names of the bibles in central directory'
|
15
16
|
subcmd :search, 'Search with regular expressions' do
|
16
17
|
opt :name, 'Name of the bible module filename of an .sqlbible file', type: String
|
17
18
|
opt :search, 'Regular expression to search (multiple allowed)', type: String, multi: true, required: true
|
@@ -75,6 +76,9 @@ when 'convert'
|
|
75
76
|
end
|
76
77
|
Sqlbible.convert osis_fn, sqlbible_fn
|
77
78
|
exit
|
79
|
+
when 'list'
|
80
|
+
puts 'Available bible names:'
|
81
|
+
puts Sqlbible.bible_names.join("\n")
|
78
82
|
when 'search'
|
79
83
|
searches = subopts[:search]
|
80
84
|
lang_mod = determine_lang_mod(subopts)
|
data/lib/sqlbible/version.rb
CHANGED
data/lib/sqlbible.rb
CHANGED
@@ -83,6 +83,13 @@ class Sqlbible
|
|
83
83
|
File.read(File.join(__dir__, '../schema.sql'))
|
84
84
|
end
|
85
85
|
|
86
|
+
# Get a list of the names of the bibles in bibles_dir
|
87
|
+
def bible_names
|
88
|
+
Dir.chdir bibles_dir do
|
89
|
+
Dir['*.sqlbible'].map {|fn| fn.sub(/\.sqlbible$/, '')}.sort
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
86
93
|
# Get an array of the major and minor version of the database schema of the
|
87
94
|
# actual version of the lib
|
88
95
|
def schema_major_minor
|