重写为 AI 情报 Agent 并接入 Jenkins 流水线
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
from datetime import date
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
class ReportWriter:
|
||||
"""把人可读日报写入本地文件。"""
|
||||
|
||||
def __init__(self, base_dir: Path) -> None:
|
||||
self.base_dir = base_dir
|
||||
|
||||
def write_daily_report(self, run_date: date, content_md: str) -> Path:
|
||||
# 日报按日期落盘,便于人工浏览和备份。
|
||||
self.base_dir.mkdir(parents=True, exist_ok=True)
|
||||
report_path = self.base_dir / f"{run_date.isoformat()}.md"
|
||||
report_path.write_text(content_md, encoding="utf-8")
|
||||
return report_path
|
||||
Reference in New Issue
Block a user