Skip to content

weekly maintenance: render report as inline HTML, redact recipient#32

Merged
stevepridemore merged 0 commit into
mainfrom
weekly-maintenance-html-email-redact
May 10, 2026
Merged

weekly maintenance: render report as inline HTML, redact recipient#32
stevepridemore merged 0 commit into
mainfrom
weekly-maintenance-html-email-redact

Conversation

@stevepridemore
Copy link
Copy Markdown
Owner

Summary

  • Step 12 now sends the weekly report as inline HTML via python -m markdown + gws gmail +send --html — tables and headings render cleanly in Gmail instead of as monospace plaintext.
  • Drops the .md attachment (the body is the deliverable; the file stays on disk for archive/grep) and avoids the gws --attach "outside cwd" validation gotcha.
  • Recipient is read from $MAINT_EMAIL instead of being hardcoded — the scheduled-task copy under ~/.claude/scheduled-tasks/ hardcodes the actual address, while the checked-in prompt stays generic.
  • New one-time prerequisite: pip install markdown (~50KB pure-Python). Documented as fail-soft (log + skip email rather than auto-install at runtime).
  • Includes the Windows-specific PYTHONIOENCODING=utf-8 + sys.stdout.reconfigure so unicode arrows (↔, →) in the report don't crash the cp1252 console codec.

Test plan

  • Verified gws gmail +send --html end-to-end with the 2026-05-10 report (message IDs 19e104d3ed191479, 19e104ea3195b5bd)
  • Confirmed Gmail renders the HTML body (tables, headings, action-item checkboxes)
  • Next scheduled Sunday run (2026-05-17) exercises the updated step 12 in production

🤖 Generated with Claude Code

@stevepridemore stevepridemore merged this pull request into main May 10, 2026
2 checks passed
@stevepridemore stevepridemore deleted the weekly-maintenance-html-email-redact branch May 10, 2026 05:38
stevepridemore added a commit that referenced this pull request May 10, 2026
Step 12 changes:
- Convert the markdown report to HTML via `python -m markdown` (extras:
  `extra` for tables, `sane_lists` for the action-item checkboxes) and
  send with `gws gmail +send --html`. Tables and headings now render
  cleanly in Gmail instead of as monospace plaintext.
- `PYTHONIOENCODING=utf-8` + `sys.stdout.reconfigure(encoding='utf-8')`
  on the python invocation — required on Windows so unicode arrows
  (↔, →) in the report don't blow up the default cp1252 console codec.
- Drop the `-a` attachment. The HTML body is the deliverable; the .md
  file remains on disk under ~/graph-memory/logs/weekly-reports/ for
  archive/grep. Also avoids the gws "outside cwd" attach validation.
- Recipient is now read from `$MAINT_EMAIL` rather than hardcoded.
  The scheduled-task copy under ~/.claude/scheduled-tasks/ hardcodes
  the actual address; the checked-in prompt stays generic.
- New prerequisite: `pip install markdown` (one-time, ~50KB pure-Python
  package). Documented as fail-soft — log + skip email rather than
  auto-install at runtime.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant