about summary refs log tree commit diff stats
path: root/util/extract_panels.rb
diff options
context:
space:
mode:
Diffstat (limited to 'util/extract_panels.rb')
-rw-r--r--util/extract_panels.rb14
1 files changed, 14 insertions, 0 deletions
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 @@
1require 'yaml'
2
3mappath = ARGV[0]
4outputpath = ARGV[1]
5
6panels = []
7
8File.readlines(mappath).each do |line|
9 line.match(/node name=\"(.*)\" parent=\"Panels\/(.*)\" instance/) do |m|
10 panels << {"id" => m[2] + "/" + m[1]}
11 end
12end
13
14File.write(outputpath, panels.to_yaml)