Sha256: a5402c246b8ecff8b7b1a169d6ee9086fce1e1e5cbec6864e3d8b3972e490949
Contents?: true
Size: 539 Bytes
Versions: 2
Compression:
Stored size: 539 Bytes
Contents
#!/usr/bin/env ruby require 'optparse' require_relative '../lib/csvpp' $options = {} option_parser = OptionParser.new do |opts| opts.on('-f', '--format FORMAT') do |format| $options[:format] = format.strip end opts.on_tail('-h', '--help', 'Show this message') do puts opts exit end end HELP = option_parser.help option_parser.parse! format = $options[:format] json = CSVPP.json( input: ARGF.read, format: File.read(format) ) # Forgive me Matz for I have sinned system %{echo '#{json}' | python -m json.tool}
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
csvpp-0.3.1 | exe/csvpp |
csvpp-0.3.0 | exe/csvpp |