Skip to content

Commit

Permalink
Import the dnscry.pt-merge scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
jedisct1 committed Sep 18, 2024
1 parent 09b83f1 commit a12fd83
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
27 changes: 27 additions & 0 deletions utils/dnscry.pt-merge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#! /usr/bin/env python3

# Origin: https://www.dnscry.pt/resolvers.md

import sys


servers = {}

in_header = True

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

# Origin: https://www.dnscry.pt/anon-relays.md

import sys


servers = {}

in_header = True

with sys.stdin as f:
while True:
head = f.readline()
if not head:
break
if in_header == True:
if head.startswith("## "):
in_header = False
else:
continue
if head.startswith("## "):
name = head.split("## ")[1]
name = f"dnscry.pt-{name}".replace(" ", "")
print(f"## {name}")
else:
print(head)

0 comments on commit a12fd83

Please sign in to comment.