fix: proper todo extraction with natural language from both digests
This commit is contained in:
36
scripts/better_todos.py
Normal file
36
scripts/better_todos.py
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
"""Re-add proper todos from all digests with natural language."""
|
||||||
|
import requests
|
||||||
|
|
||||||
|
API = "http://127.0.0.1:9001/api/todos"
|
||||||
|
|
||||||
|
# Delete all existing todos
|
||||||
|
try:
|
||||||
|
resp = requests.get(API, timeout=5)
|
||||||
|
existing = resp.json().get("todos", [])
|
||||||
|
for t in existing:
|
||||||
|
requests.delete(API + "/" + t["id"], timeout=5)
|
||||||
|
print(f"Deleted {len(existing)} old todos")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
# Better todos extracted from the 2025-06-12 and 2025-06-13 AI digests
|
||||||
|
todos = [
|
||||||
|
# From June 12 digest
|
||||||
|
"画一张决策流程图:复盘日线震荡时你为什么还是做了多单。把K线形态、指标、心理状态、触发动作画成一目了然的图,贴dashboard旁边当检查清单",
|
||||||
|
"给服务器AI搭一个即时调用接口,让我能随时通过命令行或手机快捷指令向AI提问,不需要等定时任务",
|
||||||
|
"把dashboard初始金额和策略编号的错误修掉——这两个问题动摇了整个系统的可信度",
|
||||||
|
"在Memos里建一个「倒计时」标签,每次离开一个地方或完成一个项目就写一篇告别笔记,让AI每月汇总一份",
|
||||||
|
|
||||||
|
# From June 13 digest
|
||||||
|
"设计一个Memos记录模板,每条灵感至少包含【现象】【我的理解】【疑问】三要素,花10分钟设计好",
|
||||||
|
"买录音卡并设计完整工作流:录音→AI转写→提取摘要→存入Memos→次日AI分析素材",
|
||||||
|
"选一个清华战略课模型(比如价值网依赖)来分析当前交易系统,写200字应用笔记",
|
||||||
|
"设置每周三下午为系统维护日,只做备份、修bug、优化工作流,不做新功能开发",
|
||||||
|
]
|
||||||
|
|
||||||
|
for text in todos:
|
||||||
|
r = requests.post(API, json={"text": text, "source": "inspiration", "category": "技术" if "AI" in text or "dashboard" in text or "服务器" in text or "设计" in text or "录音" in text or "维护" in text else "生活", "priority": "high" if "修掉" in text or "录音" in text or "维护" in text else "medium"}, timeout=5)
|
||||||
|
print(f" {'OK' if r.status_code==201 else 'FAIL'}: {text[:45]}...")
|
||||||
|
|
||||||
|
r = requests.get(API, timeout=5)
|
||||||
|
print(f"\nTotal: {len(r.json()['todos'])} todos added")
|
||||||
Reference in New Issue
Block a user