Skip to content

Commit

Permalink
Update generate.py
Browse files Browse the repository at this point in the history
  • Loading branch information
endail authored Jun 26, 2024
1 parent 1f046db commit f2104ea
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions scripts/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,23 @@ def ntpdig(endpoint):
readme.write("##" + list["name"] + "\n")
readme.write(list["description"] + "\n")

for srv in list["servers"]:
readme.write("###" + srv["name"] + "\n")
readme.write("|Endpoint|DNS Resolved|IP|Stratum|\n")
readme.write("|--------|------------|--|-------|\n")

for ept in srv["endpoints"]:
readme.write("|" + ept["endpoint"])
readme.write("|" + "Y" if ept["dns"] else "N")
if ept["ntp"] is not None:
readme.write("|" + ept["ntp"]["ip"})
readme.write("|" + ept["ntp"]["stratum"])
else:
readme.write("|N/A|N/A")
for srv in list["servers"]:
readme.write("###" + srv["name"] + "\n")
readme.write("|Endpoint|DNS Resolved|IP|Stratum|\n")
readme.write("|--------|------------|--|-------|\n")
for ept in srv["endpoints"]:
readme.write("|" + ept["endpoint"])
readme.write("|" + "Y" if ept["dns"] else "N")
if ept["ntp"] is not None:
readme.write("|" + ept["ntp"]["ip"})
readme.write("|" + ept["ntp"]["stratum"])
else:
readme.write("|N/A|N/A")
readme.write("|\n")


readme.write("\n")
readme.write("\n")

#print("List name: " + list["name"])
#print("List description: " + list["description"])
Expand Down

0 comments on commit f2104ea

Please sign in to comment.