fix: 脚本路径同步更新为YYYY/MM/DD嵌套结构
This commit is contained in:
@ -121,7 +121,8 @@ def _build_report(date_str, work_memos):
|
||||
def _write_report(date_str, report_text):
|
||||
"""Write report to ai-insights/daily/YYYY-MM-DD/work/"""
|
||||
output_root = get_output_dir("daily")
|
||||
work_dir = os.path.join(output_root, date_str, "work")
|
||||
parts = date_str.split("-")
|
||||
work_dir = os.path.join(output_root, parts[0], parts[1], parts[2], "work")
|
||||
os.makedirs(work_dir, exist_ok=True)
|
||||
|
||||
filepath = os.path.join(work_dir, f"工作日志_{date_str}.md")
|
||||
|
||||
@ -163,7 +163,8 @@ def read_week_daily_reports(week_start, week_end):
|
||||
date_str = current.strftime("%Y-%m-%d")
|
||||
# Daily reports are named: 每日阅读_YYYY-MM-DD.md
|
||||
filename = f"每日阅读_{date_str}.md"
|
||||
filepath = os.path.join(daily_dir, filename)
|
||||
parts = date_str.split("-")
|
||||
filepath = os.path.join(daily_dir, parts[0], parts[1], parts[2], filename)
|
||||
|
||||
if os.path.exists(filepath):
|
||||
with open(filepath, "r", encoding="utf-8") as f:
|
||||
|
||||
Reference in New Issue
Block a user