mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-05-07 23:51:12 +08:00
Minor fix
This commit is contained in:
parent
0110b70936
commit
09271ab6c3
@ -8,7 +8,7 @@ module Uplot
|
|||||||
|
|
||||||
def opt_new
|
def opt_new
|
||||||
OptionParser.new do |opt|
|
OptionParser.new do |opt|
|
||||||
opt.on('-o', '--output', TrueClass) { |v| @print = v }
|
opt.on('-o', '--output', TrueClass) { |v| @output = v }
|
||||||
opt.on('-t', '--title VAL', String) { |v| @params[:title] = v }
|
opt.on('-t', '--title VAL', String) { |v| @params[:title] = v }
|
||||||
opt.on('-w', '--width VAL', Numeric) { |v| @params[:width] = v }
|
opt.on('-w', '--width VAL', Numeric) { |v| @params[:width] = v }
|
||||||
opt.on('-h', '--height VAL', Numeric) { |v| @params[:height] = v }
|
opt.on('-h', '--height VAL', Numeric) { |v| @params[:height] = v }
|
||||||
@ -43,8 +43,6 @@ module Uplot
|
|||||||
parser.parse!(argv) unless argv.empty?
|
parser.parse!(argv) unless argv.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
def set_common_opts(opt); end
|
|
||||||
|
|
||||||
def run
|
def run
|
||||||
# Sometimes the input file does not end with a newline code.
|
# Sometimes the input file does not end with a newline code.
|
||||||
while input = Kernel.gets(nil)
|
while input = Kernel.gets(nil)
|
||||||
@ -58,7 +56,7 @@ module Uplot
|
|||||||
lines(input_lines)
|
lines(input_lines)
|
||||||
end.render($stderr)
|
end.render($stderr)
|
||||||
|
|
||||||
print input if @print
|
print input if @output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user