Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions convert.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require 'builder'
require 'zip' # rubyzip

# download latest allCountries from gronames.org
# download latest allCountries from geonames.org
file_name = 'allCountries.txt'
data = File.open(file_name).read.split("\n")

Expand Down Expand Up @@ -45,7 +45,7 @@
output_entry_stream.write(JSON.pretty_generate(subset)) # generated content
end

# json
# xml
xml_data = Builder::XmlMarkup.new(indent: 2)
xml_data.instruct! :xml, encoding: 'UTF-8'
xml_data.zipcodes do |zip|
Expand Down