Skip to content

Instantly share code, notes, and snippets.

@kvetis
kvetis / collect_countries.rb
Created June 1, 2016 13:29 — forked from igneus/collect_countries.rb
Country names harvested from the "countries" Ruby gem (https://github.com/hexorx/countries)
require 'countries'
require 'json'
require 'active_support'
require 'sort_alphabetical'
lang = ARGV[0] || 'cs'
data = ISO3166::Country
.all
.collect {|c| {name: c.translations[lang], code: c.alpha2} }