Sha256: f6ab1cca18e12a2ac089d1fd609be012ca96bdc84783e6ecd5b9c3c9fead857a
Contents?: true
Size: 721 Bytes
Versions: 2
Compression:
Stored size: 721 Bytes
Contents
#!/usr/bin/ruby -wKU if File.symlink?(__FILE__) $: << File.join(File.dirname(File.readlink(__FILE__)), '../lib') else $: << File.join(File.dirname(__FILE__), '../lib') end require 'ymldot' require 'optparse' Version = "0.0.2" is_output = false is_csv = false opt = OptionParser.new opt.version = Version opt.release = "0.0.1" opt.on('-o', 'output file to current directory. name is "#{input_filename}.dot"') {|v| is_output = true } opt.on('-c', '--csv', 'csv format output') {|v| is_csv = true } opt.parse!(ARGV) if is_output y = Ymldot.new(ARGV[0]) open("./#{y.file_name}.dot", "w") do |f| f.write(y.to_dot) end elsif is_csv puts Ymldot.new(ARGV[0]).to_csv else puts Ymldot.new(ARGV[0]).to_dot end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ymldot-0.0.3 | bin/ymldot |
ymldot-0.0.4 | bin/ymldot |