init: inspiration collector v1.0
This commit is contained in:
74
README.md
Normal file
74
README.md
Normal file
@ -0,0 +1,74 @@
|
||||
# 灵感收集器 (Inspiration Collector)
|
||||
|
||||
手机随手记灵感 → AI 自动整理 → Obsidian 自动同步
|
||||
|
||||
## 数据流向
|
||||
|
||||
```
|
||||
手机 Moe Memos → 服务器 Memos 实例
|
||||
↓
|
||||
Python 脚本 + DeepSeek API
|
||||
↓
|
||||
ai-insights/daily/ 中的 .md 文件
|
||||
↓
|
||||
git push → Gitea
|
||||
↓
|
||||
Obsidian Git 插件 pull → 你看到
|
||||
```
|
||||
|
||||
## 目录结构
|
||||
|
||||
```
|
||||
inspiration-collector/
|
||||
├── ai-insights/ # AI 生成的报告(git 追踪)
|
||||
│ ├── daily/ # 每日灵感摘要
|
||||
│ └── weekly/ # 每周灵感趋势
|
||||
├── tools/ # 核心工具模块
|
||||
│ ├── llm.py # DeepSeek API 客户端
|
||||
│ ├── memos_client.py # Memos 数据读取
|
||||
│ ├── config.py # 配置加载
|
||||
│ └── formatter.py # Markdown 输出格式化
|
||||
├── analyzers/ # 分析逻辑
|
||||
│ ├── daily_digest.py # 每日分析
|
||||
│ └── weekly_trend.py # 每周分析
|
||||
├── scripts/ # cron 入口脚本
|
||||
│ ├── run_daily_digest.sh
|
||||
│ └── run_weekly_trend.sh
|
||||
├── secrets/ # 密钥(不入库)
|
||||
│ ├── .gitignore
|
||||
│ └── secrets.json.template
|
||||
└── README.md
|
||||
```
|
||||
|
||||
## 部署步骤
|
||||
|
||||
### 1. 服务器上
|
||||
|
||||
```bash
|
||||
# 克隆仓库
|
||||
cd ~
|
||||
git clone http://localhost:3000/你的用户名/inspiration-collector.git
|
||||
|
||||
# 配置密钥
|
||||
cp secrets/secrets.json.template secrets/secrets.json
|
||||
# 编辑 secrets.json,填入你的 DeepSeek API Key 和 Memos Token
|
||||
chmod 600 secrets/secrets.json
|
||||
|
||||
# 测试运行
|
||||
python3 analyzers/daily_digest.py
|
||||
|
||||
# 设置 cron
|
||||
crontab -e
|
||||
# 添加:
|
||||
# 每日 22:00 北京时间
|
||||
0 14 * * * /home/ubuntu/inspiration-collector/scripts/run_daily_digest.sh
|
||||
# 每周日 16:00 北京时间
|
||||
0 8 * * 0 /home/ubuntu/inspiration-collector/scripts/run_weekly_trend.sh
|
||||
```
|
||||
|
||||
### 2. 笔记本 Obsidian
|
||||
|
||||
1. `git clone` 到本地
|
||||
2. Obsidian 中打开文件夹
|
||||
3. 安装 Obsidian Git 插件
|
||||
4. 设置自动拉取
|
||||
Reference in New Issue
Block a user