Import some signatures in incorrect format from #837
This commit is contained in:
parent
d97ec453b5
commit
b970932437
9 changed files with 31 additions and 0 deletions
2
_data/signed/AttackHelicopter.yaml
Normal file
2
_data/signed/AttackHelicopter.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: zeom
|
||||
link: https://github.com/AttackHelicopter
|
2
_data/signed/Jm466.yaml
Normal file
2
_data/signed/Jm466.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: José Martínez Martínez
|
||||
link: mailto:jmartinezm2000@gmail.com
|
2
_data/signed/Karlend.yaml
Normal file
2
_data/signed/Karlend.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Dmytro Lysenko
|
||||
link: mailto:johnny@ne.nae.bet
|
2
_data/signed/Niicha.yaml
Normal file
2
_data/signed/Niicha.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Niicha
|
||||
link: https://github.com/Niicha
|
2
_data/signed/nuisanthon.yaml
Normal file
2
_data/signed/nuisanthon.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: sue
|
||||
link: https://github.com/nuisanthon
|
2
_data/signed/petahi.yaml
Normal file
2
_data/signed/petahi.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Petar Hitij
|
||||
link: mailto:petahi@gmail.com
|
2
_data/signed/spithash.yaml
Normal file
2
_data/signed/spithash.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Stathis Xantinidis
|
||||
link: https://github.com/spithash
|
2
_data/signed/tuwid.yaml
Normal file
2
_data/signed/tuwid.yaml
Normal file
|
@ -0,0 +1,2 @@
|
|||
name: Artur D
|
||||
link: https://github.com/tuwid
|
|
@ -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")
|
||||
|
||||
|
|
Loading…
Reference in a new issue