ix-cli 0.0.23 → 0.0.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ix-json-to-table +10 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94b8eb446a54c5056c89bd165ab2ad95d8a467505411bb04e754fb9e21b9f8fa
|
4
|
+
data.tar.gz: a5f13c650d9a71f445004095caa015525890d04fd99a4779ad62192da9d61a85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50abf08438d6c0ffe45edff3d63bca4cc67e732d854239c942bff4f8c4bef421e0194a15e79b1164da522693e19a685ed610edf65e72b187d7eae065e135168e
|
7
|
+
data.tar.gz: 6f9e372f9346c9e6f64fea0d8db771f770e102b38fc20e565b9055a62b0e470e1d3e5685eabad03fd0610dcc3802db48dc87419c6eb285ad5081c96009dc6eb1
|
data/bin/ix-json-to-table
CHANGED
@@ -30,10 +30,14 @@ OptionParser.new do |opts|
|
|
30
30
|
options[:adjust] = value
|
31
31
|
end
|
32
32
|
|
33
|
-
opts.on('-i', '--skin [NAME]', 'Change the skin, can be: [round, none, ascii].') do |value|
|
33
|
+
opts.on('-i', '--skin [NAME]', 'Change the skin, can be: [round, square, none, ascii, double].') do |value|
|
34
34
|
options[:skin] = value
|
35
35
|
end
|
36
36
|
|
37
|
+
opts.on('-c', '--count', 'Count, weather if you want a total count of items to be added at the end.') do |value|
|
38
|
+
options[:count] = value
|
39
|
+
end
|
40
|
+
|
37
41
|
end.parse!
|
38
42
|
|
39
43
|
required_options = [:orient]
|
@@ -166,9 +170,13 @@ def print_table(data, options)
|
|
166
170
|
puts middle_ruler
|
167
171
|
puts headers
|
168
172
|
end
|
173
|
+
|
169
174
|
puts bottom_ruler
|
170
175
|
|
171
|
-
|
176
|
+
if options[:count]
|
177
|
+
puts "Total: #{data.size} rows"
|
178
|
+
end
|
179
|
+
|
172
180
|
end
|
173
181
|
|
174
182
|
def transpose(hash)
|