Created
August 26, 2019 09:37
-
-
Save reasonset/4512de0061a05384223c5321f0764a6c to your computer and use it in GitHub Desktop.
Stella LogicのContextsを結合する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
require 'yaml' | |
logic = {} | |
File.open(ARGV.shift) do |f| | |
logic = YAML.load f | |
end | |
ARGV.each do |fn| | |
File.open(fn) {|f| logic["Context"].merge! YAML.load(f)["Context"] } | |
end | |
YAML.dump logic, STDOUT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment