Files
cs249r_book/.github/scripts
Vijay Janapa Reddi 8b936802f0 feat(newsletter): workflows use news CLI; delete standalone sync script
The three GitHub Actions workflows that synced newsletter posts from
Buttondown previously called .github/scripts/sync_newsletter.py with a
bare `pip install requests`. They now install the news CLI's
requirements and call `news pull`.

- sync-newsletter.yml       (daily scheduled sync)
- site-publish-live.yml     (pre-build sync for live site)
- site-preview-dev.yml      (pre-build sync for dev preview)

Ports the production-grade logic from the old script into
cli/commands/pull.py:
  - HTML body handling (wrap in ```{=html}``` block for Quarto)
  - Auto-categorization based on subject keywords
  - Guest author detection ("Written by X" pattern)
  - Skip Buttondown placeholder images (image-generator.buttondown.email)
  - Incremental sync with early termination after 3 consecutive unchanged
  - _stats.yml generation (issue count + subscriber count)
  - --no-stats flag for runs that should not update the counter

Delete .github/scripts/sync_newsletter.py — the CLI is now the single
source of truth. No other callers.
2026-04-15 17:26:49 -04:00
..