From 0c68c2222143505d70618a38bc7c9a89bddbfa5b Mon Sep 17 00:00:00 2001 From: jay Date: Sun, 21 Jun 2026 11:38:16 -0400 Subject: [PATCH] Brand consistency: emails say "upbeatBytes" (From + digest body) Per the brand-name standard (camelCase, one word). Updated the SMTP From default and the digest email body/subject strings. Live env From values (auth.env + goodnews.env) updated to match. (Web/OG brand strings in share.py + app.html are the remaining sweep.) Co-Authored-By: Claude Opus 4.8 --- goodnews/digest.py | 12 ++++++------ goodnews/email_send.py | 2 +- tests/test_digest.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/goodnews/digest.py b/goodnews/digest.py index 25a4d33..1a96d1d 100644 --- a/goodnews/digest.py +++ b/goodnews/digest.py @@ -127,7 +127,7 @@ def _item_html(it: dict, base: str) -> str: f'
{escape(it["source"])}
' f'{summary}{why}' '
' - f'Read on Upbeat Bytes' + f'Read on upbeatBytes' f'  ·  Full story at source{lock}' '
' ) @@ -145,12 +145,12 @@ def build_digest(items: list[dict], brief_date: str, unsub_url: str, base: str | followed = followed or [] n = len(items) weekday = _weekday(brief_date) - subject = f"{weekday}'s Upbeat Bytes · {n} calm read{'' if n == 1 else 's'}" + subject = f"{weekday}'s upbeatBytes · {n} calm read{'' if n == 1 else 's'}" if weekday == "today": - subject = f"Today's Upbeat Bytes · {n} calm reads" + subject = f"Today's upbeatBytes · {n} calm reads" text_lines = [ - f"Upbeat Bytes — Daily Highlights", + f"upbeatBytes — Daily Highlights", f"{n} calm read{'' if n == 1 else 's'} for {weekday}.\n", "Good morning. A small, hopeful handful of what's going right — and there's", "always more waiting on the site whenever you want it.\n", @@ -181,7 +181,7 @@ def build_digest(items: list[dict], brief_date: str, unsub_url: str, base: str | 'font-family:-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;color:#16263a">' # The real logo as a small hosted PNG (SVG isn't email-safe); alt text # keeps the brand when a client blocks remote images. - f'Upbeat Bytes' '
Daily Highlights · {escape(weekday)}
' @@ -192,7 +192,7 @@ def build_digest(items: list[dict], brief_date: str, unsub_url: str, base: str | + main_blocks + followed_html + '

That’s today’s highlights — more good news is ' - f'always waiting on Upbeat Bytes. See you tomorrow.

' + f'always waiting on upbeatBytes. See you tomorrow.

' f'

You’re getting this because you turned on ' f'the daily digest. Unsubscribe.

' '' diff --git a/goodnews/email_send.py b/goodnews/email_send.py index 6ceb536..b30be68 100644 --- a/goodnews/email_send.py +++ b/goodnews/email_send.py @@ -24,7 +24,7 @@ def _cfg() -> dict: "port": int(os.environ.get("GOODNEWS_SMTP_PORT", "587")), "user": os.environ.get("GOODNEWS_SMTP_USER", ""), "password": os.environ.get("GOODNEWS_SMTP_PASSWORD", ""), - "sender": os.environ.get("GOODNEWS_SMTP_FROM", "Upbeat Bytes "), + "sender": os.environ.get("GOODNEWS_SMTP_FROM", "upbeatBytes "), # Where a reader's reply should land; falls back to the From address. "reply_to": os.environ.get("GOODNEWS_REPLY_TO_EMAIL", ""), } diff --git a/tests/test_digest.py b/tests/test_digest.py index fc891a8..b573198 100644 --- a/tests/test_digest.py +++ b/tests/test_digest.py @@ -20,10 +20,10 @@ def _seed(c, n=5, date="2026-06-09"): def test_build_digest_is_calm_and_dated(): items = [{"id": 1, "title": "Good thing", "canonical_url": "http://a/1", "source": "Src", "summary": "nice", "reason_text": "wonder", "paywalled": False}] subject, text, html = digest.build_digest(items, "2026-06-09", "http://ub/unsub") - assert "Tuesday's Upbeat Bytes" in subject and "1 calm read" in subject + assert "Tuesday's upbeatBytes" in subject and "1 calm read" in subject assert "Daily Highlights" in text and "Daily Highlights" in html assert "more good news is always" in text and "http://ub/unsub" in text # points back to the site - assert "Good thing" in html and "Read on Upbeat Bytes" in html and "Unsubscribe" in html + assert "Good thing" in html and "Read on upbeatBytes" in html and "Unsubscribe" in html assert "you missed" not in (text + html).lower() # no guilt language