介绍
# News Summary
## 概述
通过 RSS 订阅源获取值得信赖的国际来源的新闻并进行摘要。
## RSS 订阅源
### BBC(主要) ```bash # World news curl -s "https://feeds.bbci.co.uk/news/world/rss.xml"
# Top stories curl -s "https://feeds.bbci.co.uk/news/rss.xml"
# Business curl -s "https://feeds.bbci.co.uk/news/business/rss.xml"
# Technology curl -s "https://feeds.bbci.co.uk/news/technology/rss.xml" ```
### 路透社 ```bash # World news curl -s "https://www.reutersagency.com/feed/?best-regions=world&post_type=best" ```
### NPR(美国视角) ```bash curl -s "https://feeds.npr.org/1001/rss.xml" ```
### 半岛电视台(全球南方视角) ```bash curl -s "https://www.aljazeera.com/xml/rss/all.xml" ```
## 解析 RSS
提取标题和描述: ```bash curl -s "https://feeds.bbci.co.uk/news/world/rss.xml" | \ grep -E "<title>|<description>" | \ sed 's/<[^>]*>//g' | \ sed 's/^[ \t]*//' | \ head -30 ```
## 工作流
### 文本摘要 1. 获取 BBC 世界头条 2. 可选择补充路透社/NPR 3. 摘要主要报道 4. 按地区或主题分组
### 语音摘要 1. 创建文本摘要 2. 使用 OpenAI TTS 生成语音 3. 作为音频消息发送
```bash curl -s https://api.openai.com/v1/audio/speech \ -H "Authorization: Bearer $OPENAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "tts-1-hd", "input": "<news summary text>", "voice": "onyx", "speed": 0.95 }' \ --output /tmp/news.mp3 ```
## 示例输出格式
``` 📰 News Summary [date]
🌍 WORLD - [headline 1] - [headline 2]
💼 BUSINESS - [headline 1]
💻 TECH - [headline 1] ```
## 最佳实践
- 保持摘要简洁(5-8 个主要报道) - 优先关注突发新闻和重大事件 - 对于语音:最多约 2 分钟 - 平衡视角(西方 + 全球南方) - 如果被询问,请引用来源