mirror of
https://github.com/red-data-tools/YouPlot.git
synced 2025-09-01 04:14:53 +08:00
Add version number
This commit is contained in:
@@ -18,8 +18,10 @@ module Uplot
|
||||
end
|
||||
|
||||
def create_parser
|
||||
OptionParser.new
|
||||
.on('-o', '--output', TrueClass) { |v| @output = v }
|
||||
OptionParser.new do |opt|
|
||||
opt.program_name = 'uplot'
|
||||
opt.version = Uplot::VERSION
|
||||
opt.on('-o', '--output', TrueClass) { |v| @output = v }
|
||||
.on('-d', '--delimiter VAL', String) { |v| @delimiter = v }
|
||||
.on('-H', '--headers', TrueClass) { |v| @headers = v }
|
||||
.on('-T', '--transpose', TrueClass) { |v| @transpose = v }
|
||||
@@ -36,6 +38,7 @@ module Uplot
|
||||
.on('--fmt VAL', String) { |v| @fmt = v }
|
||||
.on('--debug', TrueClass) { |v| @debug = v }
|
||||
end
|
||||
end
|
||||
|
||||
def parse_options(argv)
|
||||
main_parser = create_parser
|
||||
|
Reference in New Issue
Block a user