Create tasks from natural language and send them to 2Do app via email. Supports both Chinese and English input.
Pass the user's raw message. The script parses task title, due date, priority, list, and tags automatically:
bash {baseDir}/scripts/send-task.sh --raw "USER_MESSAGE_HERE"
When task components are already extracted:
bash {baseDir}/scripts/send-task.sh --title "TITLE" --list "LIST_NAME" --tags "TAG1,TAG2"
| Parameter | Description | Required |
|---|---|---|
| ----------- | ------------- | ---------- |
--raw | Raw natural language input, auto-parsed | Either --raw or --title |
--title | Task title | Either --raw or --title |
--list | Target list name | No |
--tags | Tags, comma-separated | No |
Chinese: "添加任务:", "创建待办:", "提醒我:", "记录任务:", "新建任务:", "加个任务:"
English: "add task:", "create todo:", "remind me to", "remember to"
No-prefix input is also supported — the entire input becomes the task title.
Relative dates: 今天, 明天, 后天, 大后天
Week days: 周一~周日, 下周一~下周日, 星期X
Specific dates: X月X日/号
Time: 上午/下午/晚上 X点 X分/半
Extracted dates are automatically converted to 2Do's start() and due() format in the email subject for proper task scheduling.
Chinese: "列表是X", "到X列表", "标签是X和Y"
English: ", list X", ", tag X and Y"
Chinese: 紧急(high), 重要(medium), 不急(low)
English: urgent(high), important(medium), low priority(low)
Success: ✅ 任务已发送到 2Do: {task title}
Failure: error message with non-zero exit code.
Required environment variables:
TWODO_EMAIL - Recipient email address configured in 2DoSMTP_HOST - SMTP server (e.g. smtp.gmail.com)SMTP_PORT - SMTP port (587 for STARTTLS, 465 for SSL)SMTP_USER - SMTP usernameSMTP_PASS - SMTP password (app-specific password recommended)Optional:
TITLE_PREFIX - Email subject prefix for matching 2Do capture rules (e.g. "2Do:")共 1 个版本