Compare commits

...

2 commits

Author SHA1 Message Date
0d2dd03691
Add rotating light emoji upon errors 2023-12-13 20:11:54 +01:00
68fc254d88
Be less lax about spaces between emoji 2023-12-13 20:11:36 +01:00

View file

@ -46,10 +46,10 @@ for line in sys.stdin:
if "message" in line and line["message"] != "": if "message" in line and line["message"] != "":
message = line["message"] message = line["message"]
message = re.sub(r"^[#>]* *|[*_`]*", "", message) message = re.sub(r"^[#>]* ?|[*_`]*", "", message)
for emoji, numb in NUMBER_EMOJI.items(): for emoji, numb in NUMBER_EMOJI.items():
message = re.sub(f" *:{emoji}: *", numb, message) message = re.sub(f" *:{emoji}: *", numb, message)
message = re.sub(" *:(?:green)?num([0-9]+): *", lambda m: m.group(1), message) message = re.sub(" ?:(?:green)?num([0-9]+): ?", lambda m: m.group(1), message)
message = message.replace("\ufe0f", "").replace("\u20e3", "") message = message.replace("\ufe0f", "").replace("\u20e3", "")
message = message.strip() message = message.strip()
else: else:
@ -116,7 +116,7 @@ else:
else: else:
print(f"Checked from {start_number} up to {number}") print(f"Checked from {start_number} up to {number}")
if messages: if messages:
print("Errors:") print("🚨 Errors: 🚨")
print("\n".join(messages)) print("\n".join(messages))
else: else:
print("No errors! 🎉") print("No errors! 🎉")