Celestial/json2map.rb

12 lines
258 B
Ruby
Raw Permalink Normal View History

require "./celeste_map"
# fn = 'app/Content/Maps/1-ForsakenCity.bin'
ARGV.each do |fn|
base = File.basename(fn, ".json")
2018-05-22 16:20:41 +00:00
puts "Opening #{fn}"
a = CelesteMap.new(fn, fmt: :json)
2018-05-22 16:20:41 +00:00
outfn = "bin/#{base}.bin"
puts "Writing #{outfn}"
a.write outfn
end