sqlbible 1.2.0 → 1.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b620e9b57b9ffdc57b71231b5a6bfb0619dd196dd99428a4f3ab71d682f60b72
4
- data.tar.gz: 196e6a8907ab5b90adce9d9d2c935593796e9b86eb6b7d362a0ca419436b76ad
3
+ metadata.gz: '095b3bc9b6735cd1df572c88d96117b96a60ebfc2bd928c01d8ef1bf5b2c5881'
4
+ data.tar.gz: 2c9cd72e62e96e81bb210e1416c660e974a24fc17018edc8165b383c74e73083
5
5
  SHA512:
6
- metadata.gz: 2ac874cb85c60996f406f522f6d010e9e6c07c950b10ed1d9783a87ac936bc1ddc8123dc382ae92298e15382962faed773c2b43b4e6a35e4787e06a3183c5e58
7
- data.tar.gz: 927964e349b1e54f5156b3e994ef704411ed5845a0c7c13edabe175170a2d759801525438e1459c76598100159f7e7b8b07d13f39f6043edc5872f71bfa22261
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)
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  class Sqlbible
5
- VERSION = '1.2.0'
5
+ VERSION = '1.3.0'
6
6
  end
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlbible
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  original_platform: ''
7
7
  authors: