Files
check-ios-bus/Utilities/_platform/4/generate
Михаил Капелько 49cee91239 d
2024-01-29 18:09:14 +03:00

29 lines
829 B
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
import os
import sys
from Structure import *
from generateFeatureToggle import *
from parseLines import *
DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
MODULE = sys.argv[1]
# Импорт из общей для всех генераторов директории.
sys.path.append(f"{DIR}/../common")
from readFile import *
print(f"Генерируем сборный модуль '{MODULE}'...")
MODULE_DIR = f"{DIR}/../../../Modules/{MODULE}"
FILE_IN = f"{MODULE_DIR}/{MODULE}.yml"
# Читаем файл и разбираем его на ключи-значения.
lines = readFile(FILE_IN)
structure = Structure()
parseLines(lines, structure)
structure.moduleDir = MODULE_DIR
structure.module = MODULE
# Генерируем модуль FeatureToggle.
generateFeatureToggle(structure)