diff --git a/utils/dnscry.pt-merge.py b/utils/dnscry.pt-merge.py new file mode 100755 index 00000000..e0cc9eb0 --- /dev/null +++ b/utils/dnscry.pt-merge.py @@ -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) diff --git a/utils/dnscry.pt-relays-merge.py b/utils/dnscry.pt-relays-merge.py new file mode 100755 index 00000000..0336fa18 --- /dev/null +++ b/utils/dnscry.pt-relays-merge.py @@ -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)