Fix file names

This commit is contained in:
Ivanq 2021-03-25 22:38:24 +03:00
parent 1ffbab9500
commit 97452a74bc
7 changed files with 4 additions and 1 deletions

View File

@ -1,2 +1,2 @@
name: Serguei Voronkov
link: iamserje@yandex.ru
link: mailto:iamserje@yandex.ru

View File

@ -6,6 +6,9 @@ regex = re.compile(r"name: (\S+\s)*\S+\nlink: (/#|(https?://|mailto:)[a-zA-Z0-9_
ok = True
for file_name in sorted(os.listdir("_data/signed")):
if not file_name.endswith(".yaml") or file_name[:-5] != file_name[:-5].strip():
print(file_name, "has invalid name")
ok = False
with open(f"_data/signed/{file_name}") as f:
contents = f.read()
if not re.fullmatch(regex, contents):