From 7aa62e5c0ac0d86e5aed2ead2a7116ea0edbffde Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 16 Apr 2023 16:09:37 -0400 Subject: Implemented color shuffle --- util/extract_panels.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 util/extract_panels.rb (limited to 'util/extract_panels.rb') diff --git a/util/extract_panels.rb b/util/extract_panels.rb new file mode 100644 index 0000000..d524f6e --- /dev/null +++ b/util/extract_panels.rb @@ -0,0 +1,14 @@ +require 'yaml' + +mappath = ARGV[0] +outputpath = ARGV[1] + +panels = [] + +File.readlines(mappath).each do |line| + line.match(/node name=\"(.*)\" parent=\"Panels\/(.*)\" instance/) do |m| + panels << {"id" => m[2] + "/" + m[1]} + end +end + +File.write(outputpath, panels.to_yaml) -- cgit 1.4.1