Add {clock} field for notification timestamps; fix offline preview path and validator allowlist

This commit is contained in:
Justin Oro
2026-08-17 12:04:41 -07:00
parent 3f98e41063
commit c9451eeeb8
2 changed files with 13 additions and 6 deletions
+7
View File
@@ -166,6 +166,12 @@ def stamp():
return datetime.now().strftime("%Y-%m-%d %H:%M:%S")
def clock_stamp():
now = datetime.now()
hour12 = now.hour % 12 or 12
return f"{hour12}:{now.minute:02d} {now.strftime('%p')}"
class Reporter:
def __init__(self, log_path=None, quiet=False):
self.quiet = quiet
@@ -355,6 +361,7 @@ class Engine:
"target_host": self.target.host,
"target_channel": self.target.channel,
"time": stamp(),
"clock": clock_stamp(),
}
)
return context