elib_mgmt-cli 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5ebb5a23994d1c0138b148e8c7b03757365bcad534c00cbc75e2abc39f8bf8a3
4
- data.tar.gz: 761cc98071d1fa14feea8f7e1732bac675fcdc8365cf76d999a47ec5110cc9f6
3
+ metadata.gz: 55575da4503a2372784eda72a138b8beaf4a017bbcc614179081eed23c1d748a
4
+ data.tar.gz: 4813d83beb78f348fdab910c720bbb15581cc8cfe8788e5965bd0365f977e367
5
5
  SHA512:
6
- metadata.gz: fa564d2d44730a9b7e945f522ba7d2f2d9e1b2ddebad907fa609ab44ce21a127a3080b8b74da239c3830d3e57ed719270985ea33dcad30e701ac1da869c31829
7
- data.tar.gz: 8318596265bdf5527d4b3ae7f7da8506e3edfffea5839cea86bf6f390feea03f23376e40ff3edc1525f95bf965065d9b230480bf96565a39f718c1612a04d7be
6
+ metadata.gz: ee2f09dc1448b14481926e64bee6346c5984c60339d2986d39e71761cd34db31f0c8c07f9129d3d805e757d65cd20fec3e3516d2134beb6f5f2ae1eb3d287ca6
7
+ data.tar.gz: ce004b8b05e24547922a58c757cdad89ebf602d0b306f00717de2769c92cd74f03fda3f5ce4b6261a3016b546dccf56d9c153d2108c1df3d4d6cd6a1cdce97e4
data/.release_history.yml CHANGED
@@ -10,3 +10,7 @@ elib_mgmt-cli:
10
10
  :timestamp: 1679670664.929934
11
11
  - :version: 0.1.4
12
12
  :timestamp: 1679724834.2427807
13
+ - :version: 0.1.5
14
+ :timestamp: 1679728053.0471053
15
+ - :version: 0.1.6
16
+ :timestamp: 1679732600.1563754
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elib_mgmt-cli (0.1.5)
4
+ elib_mgmt-cli (0.1.7)
5
5
  colorize
6
6
  teLogger
7
7
  toolrack
data/exe/elm_auto_sort CHANGED
@@ -4,7 +4,6 @@ require 'elib_mgmt/cli'
4
4
  require 'tty/prompt'
5
5
  require 'colorize'
6
6
 
7
- require 'string/similarity'
8
7
  require 'openssl'
9
8
 
10
9
  if ARGV.length < 3
@@ -7,7 +7,6 @@ require 'yaml'
7
7
  require 'toolrack'
8
8
  include TR::CondUtils
9
9
 
10
- require 'string/similarity'
11
10
  require 'openssl'
12
11
 
13
12
  if ARGV.length < 1
@@ -4,7 +4,6 @@ require 'elib_mgmt/cli'
4
4
  require 'tty/prompt'
5
5
  require 'colorize'
6
6
 
7
- require 'string/similarity'
8
7
  require 'openssl'
9
8
 
10
9
  if ARGV.length == 0
data/exe/elm_search CHANGED
@@ -4,7 +4,6 @@ require 'elib_mgmt/cli'
4
4
  require 'tty/prompt'
5
5
  require 'colorize'
6
6
 
7
- require 'string/similarity'
8
7
  require 'openssl'
9
8
 
10
9
  if ARGV.length < 2
@@ -45,31 +44,60 @@ else
45
44
  pmt.puts " Found #{ttl} file(s) \n\n".light_blue
46
45
  if TR::RTUtils.on_linux? or TR::RTUtils.on_mac?
47
46
  begin
48
- sel = pmt.select(" Open the files? ".yellow, per_page: 10) do |m|
49
- found.values.flatten.each do |f|
50
- m.choice " * #{f}", f
51
- end
52
- m.choice " + New keyword", :new
53
- m.choice " + I've done", :abort
54
- end
55
47
 
56
- case sel
57
- when :new
58
- newKw = pmt.ask(" Please provide a new keywords (separated by ',') : ", required: true)
59
- kw = newKw.split(",").map { |v| v.strip }.reject { |v| v.empty? }
60
- when :abort
61
- pmt.puts "\n\n Have a nice day\n\n".yellow
62
- break
63
- else
64
- if TR::RTUtils.on_linux?
65
- `xdg-open #{sel}`
66
- elsif TR::RTUtils.on_mac?
67
- `open #{sel}`
48
+ opened = []
49
+ loopWithNewKw = false
50
+ loop do
51
+
52
+ if TR::RTUtils.on_linux? or TR::RTUtils.on_mac?
53
+ system("clear")
68
54
  else
69
- pmt.puts "\n\nNot sure how to open from this platform. Please nagivate to the file location at '#{sel}' and open from there\n\n".red
55
+ system("cls")
70
56
  end
71
- break
72
- end
57
+
58
+ if not opened.empty?
59
+ pmt.puts("\n\n You've opened: ".light_blue)
60
+ opened.each do |o|
61
+ pmt.puts(" - #{o}".light_blue)
62
+ end
63
+ pmt.puts
64
+ end
65
+
66
+ sel = pmt.select("\n\n Please select one of the following to open : ".yellow, per_page: 10) do |m|
67
+ m.choice " + I've done".yellow, :abort
68
+ found.values.flatten.each do |f|
69
+ m.choice " * #{f}", f
70
+ end
71
+ m.choice " + New keyword", :new
72
+ m.choice " + I've done".yellow, :abort
73
+ end
74
+
75
+ case sel
76
+ when :new
77
+ newKw = pmt.ask(" Please provide a new keywords (separated by ',') : ", required: true)
78
+ kw = newKw.split(",").map { |v| v.strip }.reject { |v| v.empty? }
79
+ loopWithNewKw = true
80
+ when :abort
81
+ pmt.puts "\n\n Have a nice day\n\n".yellow
82
+ loopWithNewKw = false
83
+ break
84
+ else
85
+ if TR::RTUtils.on_linux?
86
+ `xdg-open #{sel}`
87
+ elsif TR::RTUtils.on_mac?
88
+ `open #{sel}`
89
+ else
90
+ pmt.puts "\n\nNot sure how to open from this platform. Please nagivate to the file location at '#{sel}' and open from there\n\n".red
91
+ end
92
+
93
+ opened << sel
94
+
95
+ end # pmt.select
96
+
97
+ end # loop
98
+
99
+ break if not loopWithNewKw
100
+
73
101
  rescue TTY::Reader::InputInterrupt
74
102
  pmt.puts "\n\n Have a nice day\n\n".yellow
75
103
  break
@@ -2,6 +2,6 @@
2
2
 
3
3
  module ElibMgmt
4
4
  module Cli
5
- VERSION = "0.1.5"
5
+ VERSION = "0.1.7"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elib_mgmt-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris