From 476e6bec7fe769f7f5c65092a6423e6687c39331 Mon Sep 17 00:00:00 2001 From: Edward Betts <edward@4angle.com> Date: Fri, 21 Feb 2025 17:17:44 -0500 Subject: [PATCH] Include URL in new dates found mail. --- check.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/check.py b/check.py index 7dd2d34..fc8d10c 100755 --- a/check.py +++ b/check.py @@ -89,7 +89,7 @@ def load_previous_dates() -> set[str]: return set() -def save_dates(dates: list[date]): +def save_dates(dates: list[date]) -> None: """Save current dates to file as ISO strings.""" DATA_DIR.mkdir(parents=True, exist_ok=True) with open(DATA_FILE, "w") as f: @@ -113,7 +113,11 @@ def send_email(new_dates: list[date], config: configparser.ConfigParser) -> None """Send email with new dates.""" email_config = config["mail"] subject = "New Ferrocarril Central Dates Available!" - body = "New dates found:\n" + "\n".join(d.strftime("%d %B %Y") for d in new_dates) + body = ( + "New dates found:\n" + + "\n".join(d.strftime("%d %B %Y") for d in new_dates) + + f"\n\n{URL}" + ) msg = MIMEText(body) msg["Subject"] = subject