This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
OfferCatcher 是一个招聘邮件提醒同步工具,配合 OpenClaw 使用。通过 Apple Mail 扫描邮件,OpenClaw LLM 解析内容,Apple Reminders 创建提醒。
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ scan-only │ --> │ OpenClaw │ --> │ apply-events│
│ 获取邮件 │ │ LLM 解析 │ │ 创建提醒 │
└─────────────┘ └─────────────┘ └─────────────┘
不使用正则匹配:邮件解析由 OpenClaw LLM 完成,能适应各种格式的邮件。
python3 scripts/recruiting_sync.py --scan-only返回原始邮件 JSON,供 OpenClaw LLM 解析。
python3 scripts/recruiting_sync.py --apply-events /tmp/events.json --dry-run
python3 scripts/recruiting_sync.py --apply-events /tmp/events.jsonpython3 scripts/manual_event.py --title "重要事件" --due "2026-04-01 10:00" --notes "入口:https://example.com"python3 -m unittest discover tests/ -vapply-events 接受的 JSON 格式:
{
"events": [
{
"id": "唯一标识",
"company": "公司名称",
"event_type": "interview | written_exam | assessment | authorization | deadline",
"title": "提醒标题",
"timing": {"start": "YYYY-MM-DD HH:MM", "end": "..."} 或 {"deadline": "..."},
"role": "岗位名称",
"link": "入口链接",
"message_id": "原始邮件ID",
"subject": "邮件主题",
"sender": "发件人"
}
]
}| 文件 | 作用 |
|---|---|
scripts/recruiting_sync.py |
主脚本:scan-only / apply-events |
scripts/apple_reminders_bridge.py |
Apple Reminders 桥接 |
scripts/manual_event.py |
手工记录事件 |
scripts/list_mail_sources.py |
列出 Apple Mail 账户 |
~/.openclaw/offercatcher.yaml:
mail_account: 谷歌 # Apple Mail 账号名
days: 2 # 扫描天数
max_results: 60 # 最大邮件数- Python 3.11+,dataclass 定义数据结构
- 中文注释和输出
- 遵循 PEP 8