Improve AI daily report operations and dedupe observability
This commit is contained in:
24
skill/scripts/weekly_audit.py
Normal file
24
skill/scripts/weekly_audit.py
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
from __future__ import annotations
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
REPO_DIR = Path(__file__).resolve().parents[2]
|
||||
if str(REPO_DIR) not in sys.path:
|
||||
sys.path.insert(0, str(REPO_DIR))
|
||||
|
||||
from ai_daily_report.audit import render_markdown, summarize_reports
|
||||
|
||||
|
||||
def main() -> int:
|
||||
out_dir = Path.home() / ".hermes" / "scripts" / "ai_morning_out"
|
||||
if not out_dir.exists():
|
||||
print("AI日报每周审计:未找到输出目录")
|
||||
return 1
|
||||
print(render_markdown(summarize_reports(out_dir, limit_days=7)))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Reference in New Issue
Block a user