Add a Monday-morning weekly recap briefing
No US session closes into Monday KST, so Mondays (default 07:00, cron in the daemon with restart catch-up) now publish a weekly review built entirely from stored data: the quotes table collapsed into week-over- week changes and the week's daily briefing headlines as the narrative. The recap is a BriefingResult kind="weekly" reusing MarketPayload, so the store, verification pass, all delivery channels (Blogger title "미국 주간 리뷰 <monday>") and the dashboard (주간 리뷰 badge) work unchanged. Manual runs via `run-once --weekly [--date <monday>]`. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,11 +54,12 @@ def briefing_html(markdown_text: str) -> str:
|
||||
|
||||
def post_title_prefix(result: BriefingResult) -> str:
|
||||
"""Stable per-day prefix - resends update the existing post instead of creating a duplicate."""
|
||||
return f"미국 마감 브리핑 {result.payload.krx_date.isoformat()}"
|
||||
label = "미국 주간 리뷰" if result.kind == "weekly" else "미국 마감 브리핑"
|
||||
return f"{label} {result.payload.krx_date.isoformat()}"
|
||||
|
||||
|
||||
def post_title(result: BriefingResult) -> str:
|
||||
"""'미국 마감 브리핑 YYYY-MM-DD — 헤드라인' (falls back to the session date without a report)."""
|
||||
"""'{prefix} — 헤드라인' (falls back to the session date without a report)."""
|
||||
base = post_title_prefix(result)
|
||||
headline = (result.report.headline or "").strip() if result.report else ""
|
||||
return f"{base} — {headline}" if headline else f"{base} (미 {result.payload.session_date.isoformat()} 세션)"
|
||||
|
||||
Reference in New Issue
Block a user