Skip to content

Instantly share code, notes, and snippets.

@cdmwebs
Created May 3, 2012 17:37
Show Gist options
  • Save cdmwebs/2587500 to your computer and use it in GitHub Desktop.
Save cdmwebs/2587500 to your computer and use it in GitHub Desktop.
require 'plist'
require 'csv'
plist = []
CSV.foreach('growth.csv', headers: true, return_headers: false) do |row|
next if row['Plant'] == 'Plant'
puts row.inspect
plist << { plant: row['Plant'], code: row['Code'], description: row['Description'].to_s }
end
f = File.new('growth.plist', 'w')
f.write(plist.to_plist)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment