calendar: add --alarm flag to send command for custom reminder triggers

Previously the send command hardcoded a 1-day VALARM. Now accepts
--alarm with duration format (e.g. 1h, 30m, 2d), defaulting to 1d.
This commit is contained in:
Yanxin Lu
2026-03-27 09:05:30 -07:00
parent 11b3e39586
commit c66ccc4c44
4 changed files with 29 additions and 4 deletions

View File

@@ -18,8 +18,10 @@ Generates the ICS and MIME email without sending. Check that:
- MIME has `Content-Type: text/calendar; method=REQUEST`
- Only `--to` recipients appear as attendees
- Times and timezone look correct
- ICS has `BEGIN:VALARM` with correct `TRIGGER` duration
```bash
# Default alarm (1 day before)
$SKILL_DIR/scripts/calendar.sh send \
--to "mail@luyx.org" \
--subject "Test Invite" \
@@ -27,6 +29,16 @@ $SKILL_DIR/scripts/calendar.sh send \
--start "${TEST_DATE}T15:00:00" \
--end "${TEST_DATE}T16:00:00" \
--dry-run
# Custom alarm (1 hour before)
$SKILL_DIR/scripts/calendar.sh send \
--to "mail@luyx.org" \
--subject "Test Invite (1h alarm)" \
--summary "Test Event (1h alarm)" \
--start "${TEST_DATE}T15:00:00" \
--end "${TEST_DATE}T16:00:00" \
--alarm 1h \
--dry-run
```
## 2. Live Send: Self-Invite