Sha256: ec14c6f12886ca599254d7bb61cb1b390d93e0a1f3821202fe790864a6f7fecc

Contents?: true

Size: 653 Bytes

Versions: 2

Compression:

Stored size: 653 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/common"
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::Csv2Yaml.convert(csvfile).to_yaml,
)

# pp Csv2Yaml.convert(filename)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
structured_csv-0.2.1 exe/structured_csv_to_yaml
structured_csv-0.2.0 exe/structured_csv_to_yaml