Import some signatures in incorrect format from #837

This commit is contained in:
Ivanq 2021-03-30 22:58:33 +03:00
parent d97ec453b5
commit b970932437
9 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,2 @@
name: zeom
link: https://github.com/AttackHelicopter

2
_data/signed/Jm466.yaml Normal file
View File

@ -0,0 +1,2 @@
name: José Martínez Martínez
link: mailto:jmartinezm2000@gmail.com

View File

@ -0,0 +1,2 @@
name: Dmytro Lysenko
link: mailto:johnny@ne.nae.bet

2
_data/signed/Niicha.yaml Normal file
View File

@ -0,0 +1,2 @@
name: Niicha
link: https://github.com/Niicha

View File

@ -0,0 +1,2 @@
name: sue
link: https://github.com/nuisanthon

2
_data/signed/petahi.yaml Normal file
View File

@ -0,0 +1,2 @@
name: Petar Hitij
link: mailto:petahi@gmail.com

View File

@ -0,0 +1,2 @@
name: Stathis Xantinidis
link: https://github.com/spithash

2
_data/signed/tuwid.yaml Normal file
View File

@ -0,0 +1,2 @@
name: Artur D
link: https://github.com/tuwid

View File

@ -13,8 +13,23 @@ for info, content in zip(parts[::2], parts[1::2]):
author = info_dict["author"]
content_lines = [line.strip() for line in content.decode().replace("`", "").strip().split("\n") if line.strip()]
imported = False
for i in range(len(content_lines) - 1):
if content_lines[i].lower().startswith("name:") and content_lines[i + 1].lower().startswith("link:"):
if not os.path.isfile(f"_data/signed/{author}.yaml"):
with open(f"_data/signed/{author}.yaml", "w") as f:
f.write("name:" + content_lines[i][5:] + "\nlink:" + content_lines[i + 1][5:] + "\n")
imported = True
if not imported and len(content_lines) == 2:
name, link = content_lines
if name.lower().startswith("name:"):
name = name[5:]
name = name.strip()
if link.lower().startswith("link:"):
link = link[5:]
link = link.strip()
if "/" in link or "@" in link:
if not os.path.isfile(f"_data/signed/{author}.yaml"):
with open(f"_data/signed/{author}.yaml", "w") as f:
f.write(f"name: {name}\nlink: {link}\n")