ix-cli 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ix-bcat +32 -0
  3. data/bin/ix-prepend +8 -0
  4. metadata +3 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 72a2619cd73f53565d9ce416626d3a1427634740336b60c75d767f06cf7ae5f9
4
- data.tar.gz: 273331403a44e58f3b16d51f40f284ef242b982e839d7c9470d8692673a477db
3
+ metadata.gz: 9356248fcc4f5fe5c83fedeb01e13166a9764bed70c39fe06132963141f394d9
4
+ data.tar.gz: c7676df3c6b0e8427888882bc02fa609e6aa987816f76ef90e656ca6ce196ed7
5
5
  SHA512:
6
- metadata.gz: 900fe154770e1b644b345629ac9f9f0f786d471705b6802f44f8d282e37bca6667eb6cf1b7a9f97b87ef87931ddeceafc08ffcdd4ed88cfbf343975debb810ae
7
- data.tar.gz: c9be4dd356b33c16fcaa0d1df11d81c0e62f070047bbe90b032d8eefca255a30ff7a822d2215ba94e20d4141ee5470818531a44df84aed7d128717f00ac87688
6
+ metadata.gz: 21233826e4b716857231aa89c0abc3263702cf0347b71a2bfc40e3502b79946b98a7b3ae5496bf1975121ef1f3c44952bedd0415d817ac7eee34246ec91007b6
7
+ data.tar.gz: fbee1010c9fda5caf7144b8855c6ff8f502413ba3dbee2b81c630340d6c429299878b9b20cc34bc6d9fe2912e3b5e4cee44159f0b31fc947d0467957f7cf6802
@@ -175,10 +175,42 @@ class Bcat
175
175
  end
176
176
  end
177
177
 
178
+ require 'optparse'
179
+
180
+ options = {}
181
+
182
+ OptionParser.new do |opts|
183
+
184
+ opts.banner = "Usage: #{$0} [OPTIONS]"
185
+
186
+ opts.on('-p', '--pre', 'Pre.') do |value|
187
+ options[:pre] = value
188
+ end
189
+
190
+
191
+ end.parse!
192
+
193
+ required_options = []
194
+ required_options.each do |option|
195
+ unless options[option]
196
+ $stderr.puts "Can not run #{option.to_s} was not given."
197
+ exit 1
198
+ end
199
+ end
200
+
178
201
  data = []
179
202
 
180
203
  STDIN.each_line do |line|
181
204
  data.push(line)
182
205
  end
183
206
 
207
+ if options[:pre]
208
+ puts '<pre>'
209
+ end
210
+
184
211
  puts Bcat::ANSI.new(data).to_html
212
+
213
+ if options[:pre]
214
+ puts '</pre>'
215
+ end
216
+
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ print ARGV[0]
4
+
5
+ STDIN.each_line do |line|
6
+ puts line.chomp
7
+ end
8
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ix-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuyoshi Tlacaelel
@@ -199,6 +199,7 @@ executables:
199
199
  - ix-pick
200
200
  - ix-planning-tickets
201
201
  - ix-prefix
202
+ - ix-prepend
202
203
  - ix-pretty
203
204
  - ix-print-and-run
204
205
  - ix-psd-to-json
@@ -478,6 +479,7 @@ files:
478
479
  - bin/ix-pick
479
480
  - bin/ix-planning-tickets
480
481
  - bin/ix-prefix
482
+ - bin/ix-prepend
481
483
  - bin/ix-pretty
482
484
  - bin/ix-print-and-run
483
485
  - bin/ix-psd-to-json