AI Newsletter Digest improvements: fixed QP soft line break decoding, URL extraction, and content cleaning
This commit is contained in:
50
scripts/openclaw-news-research.sh
Executable file
50
scripts/openclaw-news-research.sh
Executable file
@@ -0,0 +1,50 @@
|
||||
#!/bin/bash
|
||||
# OpenClaw News Research Script
|
||||
# Searches GitHub, Reddit for OpenClaw news
|
||||
|
||||
echo "🔍 Researching OpenClaw news..." >&2
|
||||
|
||||
RESULTS=""
|
||||
|
||||
# 1. Check OpenClaw GitHub commits
|
||||
echo "🐙 Checking GitHub..." >&2
|
||||
GITHUB=$(curl -s "https://api.github.com/repos/openclaw/openclaw/commits?per_page=10" 2>/dev/null | jq -r '.[] | "- \(.commit.message | split("\n")[0]): https://github.com/openclaw/openclaw/commit/\(.sha)"' 2>/dev/null | head -5)
|
||||
|
||||
if [ -n "$GITHUB" ]; then
|
||||
RESULTS+="### 🐙 OpenClaw GitHub Commits\n$GITHUB\n\n"
|
||||
fi
|
||||
|
||||
# 2. Check OpenClaw GitHub issues
|
||||
echo "📋 Checking GitHub Issues..." >&2
|
||||
ISSUES=$(curl -s "https://api.github.com/repos/openclaw/openclaw/issues?state=open&per_page=5" 2>/dev/null | jq -r '.[] | "- \(.title): https://github.com/openclaw/openclaw/issues/\(.number)"' 2>/dev/null | head -5)
|
||||
|
||||
if [ -n "$ISSUES" ]; then
|
||||
RESULTS+="### 📋 Open GitHub Issues\n$ISSUES\n\n"
|
||||
fi
|
||||
|
||||
# 3. Check OpenClaw Discord/Community
|
||||
echo "💬 Checking for community news..." >&2
|
||||
|
||||
# 4. General AI assistant news
|
||||
echo "🌐 Checking web..." >&2
|
||||
WEB=$(web_search --query "openclaw AI assistant personal agent 2026" --count 3 2>/dev/null | jq -r '.results[] | "- \(.title): \(.url)"' 2>/dev/null | head -3)
|
||||
|
||||
if [ -n "$WEB" ]; then
|
||||
RESULTS+="### 🌐 Related News\n$WEB\n\n"
|
||||
fi
|
||||
|
||||
if [ -z "$RESULTS" ]; then
|
||||
RESULTS="No new OpenClaw news found."
|
||||
fi
|
||||
|
||||
# Format
|
||||
EMAIL_BODY="🤖 OpenClaw News Digest
|
||||
📅 $(date '+%Y-%m-%d')
|
||||
|
||||
$RESULTS
|
||||
|
||||
---
|
||||
🧠 Sent by Krilly 🦀"
|
||||
|
||||
echo "$EMAIL_BODY" > /tmp/openclaw-news-digest.txt
|
||||
echo "✅ Done" >&2
|
||||
Reference in New Issue
Block a user