Проверка шаблона шины для iOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
859B

  1. #!/usr/bin/env python3
  2. import os
  3. import sys
  4. from process import *
  5. DIR = os.path.dirname(os.path.realpath(sys.argv[0]))
  6. # Требуем имя модуля в качестве аргумента.
  7. if len(sys.argv) < 2:
  8. print("Usage: /path/to/generate MODULE")
  9. sys.exit(1)
  10. # Импорт из общей для всех генераторов директории.
  11. sys.path.append(f"{DIR}/../common")
  12. from modulePaths import *
  13. from readFile import *
  14. from readKeyValue import *
  15. (PATH, MODULE) = modulePaths(sys.argv[1])
  16. print(f"Генерируем платформу для модуля '{PATH}'...")
  17. FILE_IN = f"{DIR}/../../../Modules/{PATH}/{MODULE}.yml"
  18. DIR_OUT = f"{DIR}/../../../Modules/{PATH}/src/"
  19. FILE_OUT = os.path.join(DIR_OUT, f"{MODULE}.Generated.swift")
  20. process(DIR, DIR_OUT, FILE_IN, FILE_OUT, MODULE, PATH, readFile, readKeyValue)