Sha256: b36b69146c9ffa91f4eb1557ec7c612f788d9f9c72358a9bb3e804053062b02c
Contents?: true
Size: 623 Bytes
Versions: 1
Compression:
Stored size: 623 Bytes
Contents
#!/usr/bin/env ruby # resolve bin path, ignoring symlinks require "pathname" bin_file = Pathname.new(__FILE__).realpath # add self to libpath $:.unshift File.expand_path("../../lib", bin_file) # Fixes https://github.com/rubygems/rubygems/issues/1420 require "rubygems/specification" class Gem::Specification def this self end end require "structured_csv/csv2yaml" csvfile = ARGV.pop raise "first argument must be a .csv file!" unless /\.csv$/.match?(csvfile) outfile = csvfile.gsub(/csv$/, "yaml") IO.write( outfile, StructuredCsv::CsvTo2Yaml.convert(csvfile).to_yaml, ) # pp Csv2Yaml.convert(filename)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
structured_csv-0.1.1 | exe/structured_csv_to_yaml |