feat: 阅读周报 + 工作日志(日报/周报) 报告生成脚本
This commit is contained in:
29
scripts/run_daily_work_report.sh
Executable file
29
scripts/run_daily_work_report.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Daily work report generator
|
||||
# Reads today's work-related Memos → generates daily work log
|
||||
# Run: daily, alongside the daily digest (22:00 Beijing = 14:00 UTC)
|
||||
|
||||
set -e
|
||||
|
||||
INSP_DIR="/home/ubuntu/inspiration-collector"
|
||||
LOG_FILE="/tmp/daily_work_report_$(date +%Y%m%d).log"
|
||||
|
||||
echo "[$(date)] Starting daily work report..." | tee "$LOG_FILE"
|
||||
|
||||
cd "$INSP_DIR"
|
||||
git pull origin main 2>&1 | tee -a "$LOG_FILE"
|
||||
|
||||
echo "[$(date)] Running analyzer..." | tee -a "$LOG_FILE"
|
||||
python3 analyzers/daily_work_report.py 2>&1 | tee -a "$LOG_FILE"
|
||||
|
||||
echo "[$(date)] Committing and pushing..." | tee -a "$LOG_FILE"
|
||||
git add ai-insights/daily/ 2>/dev/null || true
|
||||
|
||||
if git diff --cached --quiet; then
|
||||
echo "[$(date)] No changes" | tee -a "$LOG_FILE"
|
||||
else
|
||||
git commit -m "daily: work report $(date +%Y-%m-%d)" 2>&1 | tee -a "$LOG_FILE"
|
||||
git push origin main 2>&1 | tee -a "$LOG_FILE"
|
||||
fi
|
||||
|
||||
echo "[$(date)] Done." | tee -a "$LOG_FILE"
|
||||
Reference in New Issue
Block a user