Проверка шаблона шины для iOS
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

generateServiceSections.py 879B

il y a 1 an
123456789101112131415161718192021222324252627
  1. from generation.hasSectionGenerated import *
  2. from generation.sectionFunctions import *
  3. from generation.sectionNames import *
  4. def generateServiceSections(c):
  5. fileName = f"{c.dir}/templates/service-section"
  6. lines = c.readFile(fileName)
  7. fmtService = lines[0]
  8. fmtPlatform = lines[1]
  9. items = []
  10. sections = sectionNames(c)
  11. for name in sections:
  12. # Пропускаем секции, не относящиеся к сервису.
  13. funcs = sectionFunctions(name, c)
  14. if "setupService" not in funcs:
  15. continue
  16. ln = fmtService.replace("%NAME%", name)
  17. items.append(ln)
  18. # Генерированная секция.
  19. # Должна быть добавлена последней.
  20. if hasSectionGenerated(c.structure.service):
  21. items.append(fmtPlatform)
  22. c.serviceSections= "\n".join(items)