resedit 1.3.1 → 1.3.3
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/lib/resedit/app/app.rb +1 -1
- data/lib/resedit/app/app_command.rb +1 -1
- data/lib/resedit/app/std_commands.rb +40 -4
- data/lib/resedit/app/text_convert.rb +1 -1
- data/lib/resedit.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eabff0ab69b6b4b0518043c87df22ab64975fd75
|
4
|
+
data.tar.gz: 00d3c5fa263598370ea4f0ad4c26c745db7c0e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6cd69c1fc4bfc35d4c07089eeea46842c493882e8d65b7ae84ed8b288d45daf5d092eb66b75e0bdb2c72280f27d9063342e6cb06e8d292dd899d4ef866a83b45
|
7
|
+
data.tar.gz: 554a4024f40a615059eb46190808fcc2c3711ce590b650a344df47e0f30eae78c062a59d7395c9bfa06f28d8e02dd4ba48c3b9096f846dc0f55db2c91c5584f5
|
data/lib/resedit/app/app.rb
CHANGED
@@ -8,7 +8,7 @@ module Resedit
|
|
8
8
|
|
9
9
|
class App
|
10
10
|
HIST_FILE = "~/.resedithist"
|
11
|
-
attr_reader :name, :version, :commands, :logger, :copyright, :cmdInterface, :shell, :col
|
11
|
+
attr_reader :name, :version, :commands, :logger, :copyright, :cmdInterface, :shell, :col, :cmds
|
12
12
|
|
13
13
|
def self.get()
|
14
14
|
return @@instance
|
@@ -28,9 +28,45 @@ module Resedit
|
|
28
28
|
addParam('command', 'help on specific command', '')
|
29
29
|
end
|
30
30
|
def job(params)
|
31
|
-
|
32
|
-
|
33
|
-
|
31
|
+
if params['command']
|
32
|
+
cmd = App.get().cmds[params['command']]
|
33
|
+
raise "Unknown command: #{params['command']}" if !cmd
|
34
|
+
puts "Command:"
|
35
|
+
print "\t" + cmd.names[0]
|
36
|
+
if cmd.names.length > 1
|
37
|
+
print ' ( '
|
38
|
+
cmd.names.each.with_index{|n,i|
|
39
|
+
print n + ' ' if i > 0
|
40
|
+
}
|
41
|
+
print ')'
|
42
|
+
end
|
43
|
+
puts
|
44
|
+
puts "Usage:"
|
45
|
+
print "\t" + cmd.names[0] + ' <options>'
|
46
|
+
cmd.params.each{|p|
|
47
|
+
print ' '
|
48
|
+
print '[' if p[:def] != nil
|
49
|
+
print p[:name]
|
50
|
+
print ']' if p[:def] != nil
|
51
|
+
}
|
52
|
+
puts
|
53
|
+
puts "Params:"
|
54
|
+
cmd.params.each{|p|
|
55
|
+
puts "\t" + p[:name] + "\t - " + p[:descr]
|
56
|
+
}
|
57
|
+
puts "Options:"
|
58
|
+
rohash = cmd.ohash.invert
|
59
|
+
cmd.opts.each{|n, o|
|
60
|
+
nm = "\t--" + n
|
61
|
+
nm += '=' if o[:param]==nil
|
62
|
+
nm += ", -" + rohash[o[:name]] if rohash[o[:name]]
|
63
|
+
puts nm + "\t - " + o[:descr]
|
64
|
+
}
|
65
|
+
else
|
66
|
+
App.get().commands.each{|c|
|
67
|
+
puts c.names[0]
|
68
|
+
}
|
69
|
+
end
|
34
70
|
end
|
35
71
|
end
|
36
72
|
|
@@ -58,7 +94,7 @@ module Resedit
|
|
58
94
|
class ShellCommand < AppCommand
|
59
95
|
def initialize
|
60
96
|
super(['shell'])
|
61
|
-
addParam('shell', '
|
97
|
+
addParam('shell', 'shell name', "")
|
62
98
|
end
|
63
99
|
def job(params)
|
64
100
|
App::get().setShell(params['shell'])
|
data/lib/resedit.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: resedit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- bjfn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chunky_png
|