sqlbible 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/sqlbible +7 -7
- data/lib/sqlbible/version.rb +1 -1
- 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: 683a8988da2881cbfa8ab92eaad608d55f0c616c6ea77969fa018f41efb1adb7
|
|
4
|
+
data.tar.gz: 3b1db7c4d26616d9a1096f9086cc17379e489fa21fa96ad5c2f7c9e8d1c170c7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e58320e7522c21546bdc46fc11dd1313aafab31b88bcf3a82d23dcfec73e8c77ddc7863963795737769813f4bfad94c388c574c1db69c16645d77c5c76b4d6d6
|
|
7
|
+
data.tar.gz: 021e848f7a346d6c06ba2abe14409479ca2ed6006c846ada3b7dc34d3e82d78c60d3feff73a5edaaf403165a8f328b2770f94e6248fd4060c244e6224c2e5e22
|
data/bin/sqlbible
CHANGED
|
@@ -9,19 +9,19 @@ require 'sqlbible'
|
|
|
9
9
|
result = OptimistXL.options do
|
|
10
10
|
synopsis 'Usage: sqlbible [options] [<command> [suboptions] <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
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.1
|
|
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-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|