diff --git a/Modules/MicX/MicItem/MicItem.yml b/Modules/MicX/MicItem/MicItem.yml index def4dd8..276c9d7 100644 --- a/Modules/MicX/MicItem/MicItem.yml +++ b/Modules/MicX/MicItem/MicItem.yml @@ -1,5 +1,4 @@ version: 5 -viewmodel: - activityDates: [Date?, nil, recent] - timeout: [Bool, false, toggle] +activityDates: [Date?, nil, recent] +timeout: [Bool, false, toggle] diff --git a/Utilities/platform/5/gen5.py b/Utilities/platform/5/gen5.py new file mode 120000 index 0000000..27b874b --- /dev/null +++ b/Utilities/platform/5/gen5.py @@ -0,0 +1 @@ +/Users/mk/m/u/Utilities/platform/5/gen5.py \ No newline at end of file diff --git a/Utilities/platform/5/generate b/Utilities/platform/5/generate new file mode 100755 index 0000000..dc0f503 --- /dev/null +++ b/Utilities/platform/5/generate @@ -0,0 +1,26 @@ +#!/usr/bin/env python3 +import os +import sys +from gen5 import * + +DIR = os.path.dirname(os.path.realpath(sys.argv[0])) + +# Требуем имя модуля в качестве аргумента. +if len(sys.argv) < 2: + print("Usage: /path/to/generate MODULE") + sys.exit(1) + +# Импорт из общей для всех генераторов директории. +sys.path.append(f"{DIR}/../common") +from modulePaths import * +from readFile import * + +(PATH, MODULE) = modulePaths(sys.argv[1]) + +print(f"Генерируем платформу для модуля '{PATH}'...") + +FILE_IN = f"{DIR}/../../../Modules/{PATH}/{MODULE}.yml" +DIR_OUT = f"{DIR}/../../../Modules/{PATH}/src/" +FILE_OUT = os.path.join(DIR_OUT, f"{MODULE}.Generated.swift") + +gen5(DIR, DIR_OUT, FILE_IN, FILE_OUT, MODULE, PATH, readFile)