New Feature — (Advanced Usage) 🗓️🔁 Periodic TODOs
Automatically add recurring tasks to your TODO list using the new add_periodic_todos function!
This feature supports daily, weekly, monthly, and yearly tasks.
If a task is due today and isn’t already in your list, it will be added automatically.
💡 Example
periodic_todos = [
{"content": "Stretch body", "type": "daily"},
{"content": "Buy milk for Nriver :)", "type": "daily"},
{"content": "Wash clothes", "type": "weekly", "weekday": 6},
{"content": "Write monthly report", "type": "monthly", "day": 1},
{"content": "Annual review", "type": "yearly", "month": 12, "day": 31},
{"content": "Pay bills", "type": "monthly", "day": 15, "end_date": "2077-01-01"},
]
ea.add_periodic_todos(periodic_todos)🔗 More advanced usage
For more complex usage and options, please refer to the documentation.
New Feature — 📄 Create Branch (Note Clone)
In ETAPI, this is called a branch, but in the Trilium UI it represents a note clone.
Here’s an example of creating a clone of note2 under note1:
res = ea.create_branch(
noteId="note2",
parentNoteId="note1",
)
🗓️🔁 新功能 — (高级用法) 周期性 TODO
现在可以使用 add_periodic_todos 自动添加循环任务到待办列表!
支持 每日、每周、每月和每年 的任务。
如果任务今天到期且今天的清单中没有,它会自动添加。
💡 示例
periodic_todos = [
{"content": "每天拉伸身体", "type": "daily"},
{"content": "每天给 Nriver 买牛奶 :)", "type": "daily"},
{"content": "每周六洗衣服", "type": "weekly", "weekday": 6},
{"content": "每月 1 日写月报", "type": "monthly", "day": 1},
{"content": "年度总结", "type": "yearly", "month": 12, "day": 31},
{"content": "每月 15 日交账单", "type": "monthly", "day": 15, "end_date": "2077-01-01"},
]
ea.add_periodic_todos(periodic_todos)🔗 更多复杂用法
更多高级用法和配置说明,请参考官方文档:周期性 TODO
新功能 — 创建笔记克隆(分支)
在 ETAPI 中,这个对象被称为 branch(分支),但在 Trilium 用户界面中,它表示 笔记克隆(note clone)。
下面示例演示如何在 note1 下创建 note2 的克隆:
res = ea.create_branch(
noteId="note2",
parentNoteId="note1",
)