ix-cli 0.0.23 → 0.0.25
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/ix-json-to-csv +1 -1
- 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: f91aade16c9caf38a86cbb707cb450d7a8fc9b7f4c6c1b66f2b11c6cc1e1fd5c
|
4
|
+
data.tar.gz: 02f508ac05321cc4154d34070e0c7d78bf06fec9a8206fcdbe56b4f2d3e78826
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ae606dcb64a65ede528f1751f7ed990d512c59c9aac7ed0a38ead30664d93deb58c01cdee5ba7d330babd69180b76f82becbc290c83d1eda53439d8eceb6e01
|
7
|
+
data.tar.gz: c02fc0ffdcb1943467d74400542bec8d9b836fb80f202dfe747796714560de7f5970bc37af32af58997f163ec88184520030f1f8f4fb2686950c8803a8960678
|
data/bin/ix-json-to-csv
CHANGED
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)
|