Skip to content

Commit

Permalink
Rename "head" to "line"
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Sep 19, 2024
1 parent 1f51996 commit c1af5a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
12 changes: 6 additions & 6 deletions utils/dnscry.pt-merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

with sys.stdin as f:
while True:
head = f.readline()
if not head:
line = f.readline()
if not line:
break
if in_header == True:
if head.startswith("## "):
if line.startswith("## "):
in_header = False
else:
continue
if head.startswith("## "):
name = head.split("## ")[1]
if line.startswith("## "):
name = line.split("## ")[1]
name = f"dnscry.pt-{name}".replace(" ", "")
print(f"## {name}")
else:
print(head)
print(line)
12 changes: 6 additions & 6 deletions utils/dnscry.pt-relays-merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@

with sys.stdin as f:
while True:
head = f.readline()
if not head:
line = f.readline()
if not line:
break
if in_header == True:
if head.startswith("## "):
if line.startswith("## "):
in_header = False
else:
continue
if head.startswith("## "):
name = head.split("## ")[1]
if line.startswith("## "):
name = line.split("## ")[1]
name = f"dnscry.pt-{name}".replace(" ", "")
print(f"## {name}")
else:
print(head)
print(line)
6 changes: 3 additions & 3 deletions utils/quad9-merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ def __init__(self, name, description, stamps):

with sys.stdin as f:
while True:
head = f.readline()
if head == "":
line = f.readline()
if line == "":
break
parts = head.strip().split("## ")
parts = line.strip().split("## ")
name = parts[1].strip()
description = f.readline().strip()
stamp = f.readline().strip()
Expand Down

0 comments on commit c1af5a7

Please sign in to comment.