Trying very hard not to miss calendar events
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add simple alternative

Co-authored-by: Claude <noreply@anthropic.com>

+52
+21
alarma-simple.sh
··· 1 + #!/usr/bin/env bash 2 + # alarma-simple.sh - The simplest possible calendar query 3 + # Just runs a hardcoded SQL query against EDS cache databases 4 + 5 + set -euo pipefail 6 + 7 + # Hardcoded paths 8 + EDS_CACHE_PATH="$HOME/.cache/evolution/calendar" 9 + QUERY_FILE="$(dirname "$0")/events-query.sql" 10 + 11 + echo "Querying Evolution Data Server calendar cache..." 12 + echo 13 + 14 + # Find all cache databases and run the query 15 + for cache_db in "$EDS_CACHE_PATH"/*/cache.db; do 16 + if [ -f "$cache_db" ]; then 17 + echo "=== $(basename "$(dirname "$cache_db")") ===" 18 + sqlite3 -header -column "$cache_db" < "$QUERY_FILE" 2>/dev/null || true 19 + echo 20 + fi 21 + done
+31
events-query.sql
··· 1 + -- Query Evolution Data Server calendar cache for events 2 + -- Hardcoded date range: 2025-12-25 to 2026-03-31 (extended to catch recurring events) 3 + -- This query works against ~/.cache/evolution/calendar/{hash}/cache.db 4 + 5 + SELECT 6 + ECacheUID, 7 + summary, 8 + -- Use occur_start if available (for recurring events), 9 + -- otherwise parse DTSTART from the iCalendar object 10 + CASE 11 + WHEN occur_start != '' THEN occur_start 12 + ELSE substr( 13 + substr(ECacheOBJ, instr(ECacheOBJ, 'DTSTART')), 14 + instr(substr(ECacheOBJ, instr(ECacheOBJ, 'DTSTART')), ':') + 1, 15 + 15 16 + ) 17 + END as event_start, 18 + -- Extract location from iCalendar object if present 19 + CASE 20 + WHEN instr(ECacheOBJ, 'LOCATION:') > 0 THEN 21 + rtrim(substr( 22 + substr(ECacheOBJ, instr(ECacheOBJ, 'LOCATION:')), 23 + 10, 24 + instr(substr(ECacheOBJ, instr(ECacheOBJ, 'LOCATION:')), char(10)) - 10 25 + )) 26 + ELSE '' 27 + END as location 28 + FROM ECacheObjects 29 + WHERE substr(event_start, 1, 8) BETWEEN '20251225' AND '20260115' 30 + AND event_start != '' 31 + ORDER BY event_start;