From a10385450bbbbc21ccfcf64aa510e86e0de7896e Mon Sep 17 00:00:00 2001 From: kovacsv Date: Mon, 1 Nov 2021 07:47:19 +0100 Subject: [PATCH] Remove unused tool. --- tools/classhierarchy.py | 46 ----------------------------------------- 1 file changed, 46 deletions(-) delete mode 100644 tools/classhierarchy.py diff --git a/tools/classhierarchy.py b/tools/classhierarchy.py deleted file mode 100644 index af5f97c..0000000 --- a/tools/classhierarchy.py +++ /dev/null @@ -1,46 +0,0 @@ -import os -import re -import sys -import json - -from lib import tools_lib as Tools - -def PrintInfo (message): - print ('INFO: ' + message) - -def PrintError (message): - print ('ERROR: ' + message) - -def Main (argv): - toolsDir = os.path.dirname (os.path.abspath (__file__)) - rootDir = os.path.dirname (toolsDir) - os.chdir (rootDir) - - configFilePath = os.path.join (rootDir, 'tools', 'config.json') - config = None - with open (configFilePath) as configJson: - config = json.load (configJson) - - files = [] - for filePath in config['engine_files']: - files.append (filePath) - for filePath in config['website_files_js']: - files.append (filePath) - - pumlContent = '' - classNames = [] - classInheritances = [] - for filePath in files: - content = Tools.GetFileContent (os.path.join (rootDir, filePath)) - for match in re.finditer ('(.*) = class', content): - classNames.append (match.group (1)) - pumlContent += 'class ' + match.group (1) + '\n' - for match in re.finditer ('(.*) = class extends (.*)', content): - classInheritances.append ((match.group (1), match.group (2))) - pumlContent += match.group (2) + ' <|-- ' + match.group (1) + '\n' - - Tools.WriteContentToFile ('a.puml', pumlContent) - Tools.RunCommand ('npx', ['puml', 'generate', 'a.puml', '-o', 'a.png']) - return 0 - -sys.exit (Main (sys.argv))