From 1e4f9ed5085884a297d89ddcccad1c08466d7ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christer=20War=C3=A9n?= Date: Mon, 3 Nov 2025 02:40:44 +0200 Subject: [PATCH] Generator Update --- generator.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/generator.php b/generator.php index 4e3e7cc..259c381 100644 --- a/generator.php +++ b/generator.php @@ -7,25 +7,31 @@ $dirs = [ __DIR__.'/src/commands/*.sh', __DIR__.'/src/commands/*/*.sh', __DIR__.'/src/commands/*/*/*.sh', - __DIR__.'/src/functions/*.sh' + __DIR__.'/src/functions/*.sh', + __DIR__.'/src/ui/*.sh' ]; $codes = []; foreach($dirs as $dir){ foreach(glob($dir) as $file){ + if(str_contains($dir, "commands")){ + $codes['commands'][$file] = file_get_contents($file); + } if(str_contains($dir, "functions")){ $codes['functions'][$file] = file_get_contents($file); } - if(str_contains($dir, "commands")){ - $codes['commands'][$file] = file_get_contents($file); + if(str_contains($dir, "ui")){ + $codes['ui'][$file] = file_get_contents($file); } } } $code = str_replace("{{ FUNCTIONS }}", implode("\n", $codes['functions']), $base); +$code = str_replace("{{ UI }}", implode("\n", $codes['ui']), $code); $code = str_replace("{{ COMMANDS }}", implode("\n", $codes['commands']), $code); + try { $file = __DIR__.'/wx.tmp'; $file = fopen($file, "w");