AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning

This commit is contained in:
Krilly
2026-03-04 13:29:22 +00:00
parent 29a98137a7
commit 57dd294675
13706 changed files with 2114953 additions and 237629 deletions

View File

@@ -0,0 +1,50 @@
#!/bin/bash
# Delete a calendar event by UID
# Usage: cal-delete.sh <event-uid> [calendar_name]
# If calendar not specified, searches all calendars
EVENT_UID="${1:-}"
CALENDAR_NAME="${2:-}"
if [ -z "$EVENT_UID" ]; then
echo "Usage: cal-delete.sh <event-uid> [calendar_name]"
exit 1
fi
osascript - "$EVENT_UID" "$CALENDAR_NAME" <<'EOF'
on run argv
set eventUID to item 1 of argv as string
set calendarName to item 2 of argv as string
tell application "Calendar"
if calendarName is not "" then
try
set cals to {calendar calendarName}
on error
return "Error: Calendar '" & calendarName & "' not found"
end try
else
set cals to calendars
end if
repeat with cal in cals
try
set matchingEvents to (every event of cal whose uid is eventUID)
if (count of matchingEvents) > 0 then
set e to item 1 of matchingEvents
set eventName to summary of e
if not (writable of cal) then
return "Error: Calendar '" & (name of cal) & "' is read-only"
end if
delete e
return "Deleted event: " & eventName & " (" & eventUID & ")"
end if
end try
end repeat
return "Error: Event with UID '" & eventUID & "' not found"
end tell
end run
EOF