diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-16 16:09:37 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-04-16 16:09:37 -0400 |
commit | 7aa62e5c0ac0d86e5aed2ead2a7116ea0edbffde (patch) | |
tree | 2e35e9166e01ead9e0bdddb1db9c3a18a2fa6266 /util/extract_panels.rb | |
parent | 36eee0423e7f29e352c9c44d0ebb592007ec7436 (diff) | |
download | lingo-archipelago-7aa62e5c0ac0d86e5aed2ead2a7116ea0edbffde.tar.gz lingo-archipelago-7aa62e5c0ac0d86e5aed2ead2a7116ea0edbffde.tar.bz2 lingo-archipelago-7aa62e5c0ac0d86e5aed2ead2a7116ea0edbffde.zip |
Implemented color shuffle
Diffstat (limited to 'util/extract_panels.rb')
-rw-r--r-- | util/extract_panels.rb | 14 |
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 @@ | |||
1 | require 'yaml' | ||
2 | |||
3 | mappath = ARGV[0] | ||
4 | outputpath = ARGV[1] | ||
5 | |||
6 | panels = [] | ||
7 | |||
8 | File.readlines(mappath).each do |line| | ||
9 | line.match(/node name=\"(.*)\" parent=\"Panels\/(.*)\" instance/) do |m| | ||
10 | panels << {"id" => m[2] + "/" + m[1]} | ||
11 | end | ||
12 | end | ||
13 | |||
14 | File.write(outputpath, panels.to_yaml) | ||