git @ Cat's Eye Technologies Dipple / master ruby / rewrite-yaml.rb
master

Tree @master (Download .tar.gz)

rewrite-yaml.rb @masterraw · history · blame

#!/usr/bin/env ruby1.9.1
# encoding: UTF-8

# SPDX-FileCopyrightText: Chris Pressey, the original author of this work, has dedicated it to the public domain.
# For more information, please refer to <https://unlicense.org/>
# SPDX-License-Identifier: Unlicense

# Requires Ruby 1.9.1 for its order-retaining hashes.

require 'yaml'

data = YAML.load_file(ARGV[0])

open('output.yaml', 'w') do |f|
  YAML::dump(data, f)
end