This commit is contained in:
Михаил Капелько
2023-12-28 13:33:48 +03:00
parent 16026a7b47
commit d893364ff4
93 changed files with 2130 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import os
def sectionNames(c):
prefix = "Section"
ending = ".swift"
fileNames = os.listdir(c.src)
items = []
for fileName in sorted(fileNames):
# Пропускаем файлы, не являющиеся секциями.
id = fileName.find(prefix)
if id == -1:
continue
# Вычленяем имя секции из имени файла.
name = fileName[id + len(prefix):-len(ending)]
items.append(name)
return items