Task Sync
Operate and troubleshoot bidirectional task sync between TickTick and Google Tasks.
Run
CODEBLOCK0
Setup Checklist
- 1. Python 3.10+ with: INLINECODE0
- Enable Google Tasks API and run:
python {baseDir}/scripts/setup_google_tasks.py
- 3. Create TickTick developer app and run:
python {baseDir}/scripts/setup_ticktick.py
- 4. Configure
{baseDir}/config.json token and data paths.
Expected Behavior
- - Sync Google Task Lists
<-> TickTick Projects by same name. - Sync task title, completion status, and notes/content bidirectionally.
- Map TickTick priority to Google title prefix:
[★] high, [!] medium. - Export TickTick smart lists (Today, Next 7 Days, All) to Google Tasks one-way.
Due-Date Rule (Calendar Duplicates)
- - Keep due dates only in the "All" smart list.
- For other synced lists, forward date to TickTick then clear Google due date.
- Treat this as the source-of-truth rule when debugging duplicate Calendar items.
Automation
CODEBLOCK3
Use OpenClaw cron if available.
Troubleshooting Workflow
- 1. Re-run both OAuth setup scripts if auth errors appear.
- Verify
config.json paths point to existing token files. - Run
python {baseDir}/sync.py and inspect sync_log.json and sync_db.json. - Check API wrappers:
-
{baseDir}/utils/google_api.py
- INLINECODE10
任务同步
操作并排查TickTick与Google Tasks之间的双向任务同步问题。
运行
bash
python {baseDir}/sync.py
设置清单
- 1. Python 3.10+ 并安装以下依赖:google-auth google-auth-oauthlib google-api-python-client requests
- 启用Google Tasks API并运行:
bash
python {baseDir}/scripts/setup
googletasks.py
- 3. 创建TickTick开发者应用并运行:
bash
python {baseDir}/scripts/setup_ticktick.py
- 4. 配置{baseDir}/config.json中的令牌和数据路径。
预期行为
- - 按相同名称同步Google任务列表 <-> TickTick项目。
- 双向同步任务标题、完成状态和备注/内容。
- 将TickTick优先级映射到Google标题前缀:[★] 高优先级,[!] 中优先级。
- 将TickTick智能列表(今日、未来7天、全部)单向导出到Google Tasks。
截止日期规则(日历重复项)
- - 仅在全部智能列表中保留截止日期。
- 对于其他同步列表,将日期转发至TickTick,然后清除Google截止日期。
- 在调试重复日历项时,将此规则视为权威规则。
自动化
bash
Cron:每10分钟执行一次
/10 * /path/to/python {baseDir}/sync.py >> /path/to/sync.log 2>&1
如可用,请使用OpenClaw cron。
故障排查流程
- 1. 如果出现认证错误,请重新运行两个OAuth设置脚本。
- 验证config.json中的路径是否指向现有的令牌文件。
- 运行python {baseDir}/sync.py并检查synclog.json和syncdb.json。
- 检查API封装器:
- {baseDir}/utils/google_api.py
- {baseDir}/utils/ticktick_api.py