calendar: add EXDATE support for cancelling single occurrences of recurring events
event delete on a recurring event previously deleted the entire .ics file, killing the whole series. Now requires --date (adds EXDATE) or --all (deletes series) for recurring events, refusing to act without either flag.
This commit is contained in:
@@ -159,18 +159,24 @@ $SKILL_DIR/scripts/calendar.sh event list --format "{uid} {title}"
|
||||
# Custom date range
|
||||
$SKILL_DIR/scripts/calendar.sh event list --range-start "2026-04-01" --range-end "2026-04-30"
|
||||
|
||||
# Delete by UID
|
||||
$SKILL_DIR/scripts/calendar.sh event delete --uid "abc123@openclaw"
|
||||
# Delete a single (non-recurring) event
|
||||
$SKILL_DIR/scripts/calendar.sh event delete --match "Lunch at Tartine"
|
||||
|
||||
# Delete by summary match
|
||||
$SKILL_DIR/scripts/calendar.sh event delete --match "Allergy Shot (Tue)"
|
||||
# Cancel ONE occurrence of a recurring event (adds EXDATE, keeps the series)
|
||||
$SKILL_DIR/scripts/calendar.sh event delete --match "Allergy Shot" --date "2026-03-28"
|
||||
|
||||
# Delete an entire recurring series (requires --all safety flag)
|
||||
$SKILL_DIR/scripts/calendar.sh event delete --match "Allergy Shot" --all
|
||||
```
|
||||
|
||||
### Event Delete Safety
|
||||
|
||||
- Deletes only ONE event at a time. If multiple events match, it lists them and exits.
|
||||
- **Recurring events require `--date` or `--all`**. Without either flag, the tool refuses to act and shows usage.
|
||||
- `--date YYYY-MM-DD`: Adds an EXDATE to skip that one occurrence. The rest of the series continues.
|
||||
- `--all`: Deletes the entire .ics file (the whole series). Use only when the user explicitly wants to cancel all future occurrences.
|
||||
- **NEVER use `rm` on calendar .ics files directly.** Always use `event delete`.
|
||||
- After deleting, verify with `event list` or `khal list`.
|
||||
- After deleting/cancelling, verify with `event list` or `khal list`.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user