sqlbible 1.3.0 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sqlbible +8 -8
- data/lib/sqlbible/version.rb +1 -1
- data/lib/sqlbible.rb +1 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8eddf93d395b8029d0de33f4f87e68c719612675e808aa135d583e7d5448f95
|
4
|
+
data.tar.gz: 5ecefd2dff29958e4dd5714a1f07385508478c05381bbed70d12317d3392cae5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ad3995f53208bab47b42b75007661f849664855665e066a154cc271891dc195b6aca2057d529839e86309e8da9df39300e3519eecbebe2cad50fb374d1772d6
|
7
|
+
data.tar.gz: e5b669d1610f13f753106e2dba8f530e8b715f4456eafcca974475109fe99ce80a696d6fe0fd948064dcf5e70399f04bd5b6d9ea0a85aae752635cad9b2ddc74
|
data/bin/sqlbible
CHANGED
@@ -7,21 +7,21 @@ require 'scripref'
|
|
7
7
|
require 'sqlbible'
|
8
8
|
|
9
9
|
result = OptimistXL.options do
|
10
|
-
synopsis 'Usage: sqlbible
|
10
|
+
synopsis 'Usage: sqlbible <command> [options] [filename]?'
|
11
11
|
subcmd :convert, 'Convert a bible from OSIS-XML to Sqlbible format' do
|
12
|
-
opt :
|
12
|
+
opt :bible, '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
15
|
subcmd :list, 'Show a list of the names of the bibles in central directory'
|
16
16
|
subcmd :search, 'Search with regular expressions' do
|
17
|
-
opt :
|
17
|
+
opt :bible, 'Name of the bible module filename of an .sqlbible file', type: String
|
18
18
|
opt :search, 'Regular expression to search (multiple allowed)', type: String, multi: true, required: true
|
19
19
|
opt :lang, 'Language for parsing and formatting scripture references', type: String, permitted: %w(de en), default: 'en'
|
20
20
|
opt :output, 'Output filename', type: String
|
21
21
|
opt :range, 'Search range, example: "John 1-10"', type: String
|
22
22
|
end
|
23
23
|
subcmd :text, 'Show text of references' do
|
24
|
-
opt :
|
24
|
+
opt :bible, 'Name of the bible module filename of an .sqlbible file', type: String
|
25
25
|
opt :lang, 'Language for parsing and formatting scripture references', type: String, permitted: %w(de en), default: 'en'
|
26
26
|
opt :output, 'Output filename', type: String
|
27
27
|
opt :reference, 'Reference to show, example: "John 3:16; 10:27-30"', type: String, required: true
|
@@ -42,7 +42,7 @@ end
|
|
42
42
|
|
43
43
|
def determine_out subopts
|
44
44
|
if fn = subopts[:output]
|
45
|
-
out = File.open(
|
45
|
+
out = File.open(fn, 'w')
|
46
46
|
else
|
47
47
|
out = $stdout
|
48
48
|
end
|
@@ -62,7 +62,7 @@ when 'convert'
|
|
62
62
|
$stderr.puts 'no filename given'
|
63
63
|
exit 1
|
64
64
|
end
|
65
|
-
sqlbible_fn = Sqlbible.resolve_db_filename(subopts[:
|
65
|
+
sqlbible_fn = Sqlbible.resolve_db_filename(subopts[:bible])
|
66
66
|
if !subopts[:overwrite] && File.exist?(sqlbible_fn)
|
67
67
|
$stderr.puts format('file %s exist, conversion aborted', sqlbible_fn)
|
68
68
|
exit 1
|
@@ -89,7 +89,7 @@ when 'search'
|
|
89
89
|
range = nil
|
90
90
|
end
|
91
91
|
out = determine_out(subopts)
|
92
|
-
bible = Sqlbible.new(subopts[:
|
92
|
+
bible = Sqlbible.new(subopts[:bible])
|
93
93
|
regexes = searches.map {|s| Regexp.new(s)}
|
94
94
|
f = Scripref::Formatter.new(lang_mod, bookformat: :abbrev)
|
95
95
|
bible.search(regexes, range: range).each do |v|
|
@@ -100,7 +100,7 @@ when 'text'
|
|
100
100
|
p = Scripref::Parser.new(lang_mod)
|
101
101
|
f = Scripref::Formatter.new(lang_mod, bookformat: :abbrev)
|
102
102
|
ref = p.parse(subopts[:reference])
|
103
|
-
bible = Sqlbible.new(subopts[:
|
103
|
+
bible = Sqlbible.new(subopts[:bible])
|
104
104
|
out = determine_out subopts
|
105
105
|
bible.reference(ref).flatten.each do |v|
|
106
106
|
out.puts format_verse(f, v)
|
data/lib/sqlbible/version.rb
CHANGED
data/lib/sqlbible.rb
CHANGED
@@ -85,9 +85,7 @@ class Sqlbible
|
|
85
85
|
|
86
86
|
# Get a list of the names of the bibles in bibles_dir
|
87
87
|
def bible_names
|
88
|
-
Dir.
|
89
|
-
Dir['*.sqlbible'].map {|fn| fn.sub(/\.sqlbible$/, '')}.sort
|
90
|
-
end
|
88
|
+
Dir[File.join(bibles_dir, '*.sqlbible')].map {|fn| File.basename(fn, '.sqlbible')}.sort
|
91
89
|
end
|
92
90
|
|
93
91
|
# Get an array of the major and minor version of the database schema of the
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlbible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
platform: ruby
|
6
6
|
original_platform: ''
|
7
7
|
authors:
|
8
8
|
- Jan Friedrich
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|