Update automations: 3x daily FreshRSS, remove Mia, add Gotify, remove server monitor

- FreshRSS now runs 3x daily: 6:45 AM, 12 PM, 5 PM
- Removed Mia from birthday tracker 💔
- Removed home stack monitor cron jobs (already have monitoring)
- Added Gotify notifications to FreshRSS and birthday tracker
- Both Telegram and Gotify now receive alerts
This commit is contained in:
Krilly
2026-02-21 01:52:18 +00:00
parent 2d85d3873d
commit 180532d1e3
3 changed files with 57 additions and 9 deletions

View File

@@ -11,6 +11,8 @@ LOG_FILE="$SCRIPT_DIR/reminder-log.json"
source "$SCRIPT_DIR/../../.env" 2>/dev/null || true
TELEGRAM_CHAT="${TELEGRAM_CHAT:-1793951355}"
GOTIFY_URL="${GOTIFY_URL:-http://runtipi.kangaroo-eel.ts.net:8129}"
GOTIFY_TOKEN="${GOTIFY_TOKEN:-AGKnHafW3FGzBlt}"
log() {
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $1"
@@ -165,6 +167,24 @@ send_telegram() {
}
}
# Send Gotify message
send_gotify() {
local title="$1"
local message="$2"
local priority="${3:-5}"
curl -s -X POST "${GOTIFY_URL}/message?token=${GOTIFY_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"$title\",
\"message\": \"$message\",
\"priority\": $priority
}" > /dev/null || {
log "ERROR: Failed to send Gotify message"
return 1
}
}
# Generate gift suggestions text
gift_suggestions() {
local ideas=$(echo "$1" | jq -r '.gift_ideas | join(", ")')
@@ -248,6 +268,14 @@ check_birthdays() {
if [[ "$should_remind" == true ]]; then
log "Sending $reminder_type reminder for $name"
send_telegram "$message"
# Also send to Gotify (strip markdown for cleaner display)
local plain_message
plain_message=$(echo -e "$message" | sed 's/\*//g')
local priority=5
[[ "$reminder_type" == "today" ]] && priority=8
send_gotify "Birthday: $name" "$plain_message" "$priority"
log_reminder "$name" "$reminder_type"
((reminders_sent++))
fi

View File

@@ -35,14 +35,6 @@
"notes": "8 years old (born July 2016). Loves games, books, LEGO, sports.",
"gift_ideas": ["LEGO set", "Books", "Board games", "Sports equipment", "Science kit"],
"past_gifts": []
},
{
"name": "Mia Martin",
"relationship": "Doggo 🐕",
"birthday": "XX-XX",
"notes": "14 years old, beloved geriatric girl. Treats, toys, comfy beds.",
"gift_ideas": ["Premium dog treats", "Comfy bed", "New toy", "Grooming session"],
"past_gifts": []
}
],
"settings": {

View File

@@ -12,6 +12,8 @@ source "$SCRIPT_DIR/../../.env" 2>/dev/null || true
FRESHRSS_URL="${FRESHRSS_URL:-http://freshrss.kangaroo-eel.ts.net}"
FRESHRSS_USER="${FRESHRSS_USER:-anthony}"
TELEGRAM_CHAT="${TELEGRAM_CHAT:-1793951355}"
GOTIFY_URL="${GOTIFY_URL:-http://runtipi.kangaroo-eel.ts.net:8129}"
GOTIFY_TOKEN="${GOTIFY_TOKEN:-AGKnHafW3FGzBlt}"
# Your interest keywords for relevance ranking
INTERESTS=(
@@ -187,6 +189,27 @@ send_telegram() {
log "Sent to Telegram successfully"
}
send_gotify() {
local title="$1"
local message="$2"
local priority="${3:-5}"
log "Sending to Gotify..."
curl -s -X POST "${GOTIFY_URL}/message?token=${GOTIFY_TOKEN}" \
-H "Content-Type: application/json" \
-d "{
\"title\": \"$title\",
\"message\": \"$message\",
\"priority\": $priority
}" > /dev/null || {
log "ERROR: Failed to send Gotify message"
return 1
}
log "Sent to Gotify successfully"
}
main() {
log "Starting FreshRSS digest..."
@@ -198,9 +221,14 @@ main() {
local digest
digest=$(build_digest "$raw_articles")
# Send
# Send to both channels
send_telegram "$digest"
# Plain text version for Gotify (strip markdown)
local plain_digest
plain_digest=$(echo -e "$digest" | sed 's/\*//g' | sed 's/\[\([^]]*\)\]([^)]*)/\1/g')
send_gotify "FreshRSS Digest" "$plain_digest" 5
log "Digest complete!"
}