Skip to content

⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的 AI 舆情监控助手与热点筛选工具!聚合多平台热点 + RSS 订阅,支持关键词精准筛选。AI 智能筛选新闻 + AI 翻译 + AI 分析简报直推手机,也支持接入 MCP 架构,赋能 AI 自然语言对话分析、情感洞察与趋势预测等。支持 Docker ,数据本地/云端自持。集成微信/飞书/钉钉/Telegram/邮件/ntfy/bark/slack 等渠道智能推送。

docs: 优化文档描述

sansanf2c01c0e636c
diff --git a/README-EN.md b/README-EN.md
index a87ca8dcdc..1038e4c4aa 100644
--- a/README-EN.md
+++ b/README-EN.md
@@ -1,7 +1,5 @@
<div align="center" id="trendradar">
-> **📢 Announcement:** **v4.0.0** has been released! Including storage architecture refactoring, database optimization, modularization improvements, and more major updates
-
<a href="https://github.com/sansan0/TrendRadar" title="TrendRadar">
<img src="/_image/banner.webp" alt="TrendRadar Banner" width="80%">
</a>
@@ -59,47 +57,15 @@
* **Best for**: Users with their own server, NAS, or an always-on PC.
-* 👉 [Jump to Docker Deployment Tutorial](#6-docker-deployment)
+👉 **[Jump to Docker Deployment Tutorial](#6-docker-deployment)**
---
#### 🅱️ Option 2: GitHub Actions Deployment (Restored ✅)
-* **Features**: Data is no longer committed directly to the repo. Instead, it is stored in **Remote Cloud Storage** (supports S3-compatible protocols: Cloudflare R2, Alibaba Cloud OSS, Tencent Cloud COS, etc.).
-
-* **Requirement**: You **must** configure an S3-compatible object storage service (Cloudflare R2 recommended, it's free).
-
-> **⚠️ Note**: If you choose this option, you must complete the following two configuration steps:
-
-#### 1. 🚀 Recommended Start: Use this template
-
-To keep the repository clean and avoid inheriting redundant history, I **recommend** using Template mode:
-
-1. **Click** the green **[Use this template]** button at the top right of the original repository page.
-
-2. **Select** "Create a new repository".
-
-> **💡 Why do this?**
-> * **Use this template**: Creates a brand new, clean repository with no historical baggage.
-> * **Fork**: Retains the complete commit history and relationships, consuming more GitHub resources.
-
-#### 2. ☁️ About the Mandatory Remote Storage for GitHub Actions
-
-If you choose **Option 2 (GitHub Actions)**, you must configure an S3-compatible object storage service.
+* **Features**: Data is no longer committed directly to the repo. Instead, it is stored in **Remote Cloud Storage**.
-**Supported Storage Services:**
-- **Cloudflare R2** (Recommended, generous free tier)
-- Other S3-compatible services
-
-**⚠️ Configuration Prerequisites (Using Cloudflare R2 as Example):**
-
-According to Cloudflare platform rules, enabling R2 requires binding a payment method.
-
-* **Purpose**: Identity verification only (Verify Only). **No charges will be incurred**.
-
-* **Payment**: Supports international credit cards or PayPal.
-
-* **Usage**: The R2 free tier (10GB storage/month) is sufficient to cover the daily operation of this project. No need to worry about costs.
+* **Recommended**: Configure a remote cloud storage service (Cloudflare R2, Alibaba Cloud OSS, Tencent Cloud COS, etc.).
👉 **[Click to View Detailed Configuration Tutorial](#-quick-start)**
@@ -863,12 +829,11 @@ frequency_words.txt file added **required word** feature, using + sign
> **📖 Reminder**: Fork users should first **[check the latest official documentation](https://github.com/sansan0/TrendRadar?tab=readme-ov-file)** to ensure the configuration steps are up to date.
-### ⚠️ GitHub Actions Usage Instructions
+**⚠️ GitHub Actions Usage Instructions**
**v4.0.0 Important Change**: Introduced "Activity Detection" mechanism—GitHub Actions now requires periodic check-in to maintain operation.
-#### 🔄 Check-In Renewal Mechanism
-
+**🔄 Check-In Renewal Mechanism**:
- **Running Cycle**: Valid for **7 days**—service will automatically suspend when countdown ends.
- **Renewal Method**: Manually trigger the "Check In" workflow on the Actions page to reset the 7-day validity period.
- **Operation Path**: `Actions` → `Check In` → `Run workflow`
@@ -876,48 +841,74 @@ frequency_words.txt file added **required word** feature, using + sign
- If you forget for 7 days, maybe you don't really need it. Letting it stop is a digital detox, freeing you from the constant impact.
- GitHub Actions is a valuable public computing resource. The check-in mechanism aims to prevent wasted computing cycles, ensuring resources are allocated to truly active users who need them. Thank you for your understanding and support.
-#### 📦 Data Storage (Required Configuration)
+<details>
+<summary>👉 Click to expand: <strong>Lite Mode vs Full Mode + AI Analysis</strong></summary>
+<br>
+
+**📦 Data Storage (Recommended Configuration)**
+
+**Two Deployment Modes:**
-In GitHub Actions environment, data is stored in **Remote Cloud Storage** (supports S3-compatible protocols, Cloudflare R2 recommended for free tier), keeping your repository clean (see **Required Configuration: Remote Cloud Storage** below).
+| Mode | Configuration Required | Features |
+|------|------------------------|----------|
+| **Lite Mode** | No storage configuration needed | Real-time crawling + Keyword filtering + Multi-channel push |
+| **Full Mode** | Configure remote cloud storage | Lite Mode + New detection + Trend tracking + Incremental push + AI analysis |
-#### 🚀 Recommended: Docker Deployment
+**Lite Mode Description**:
+- ✅ Available: Real-time news crawling, keyword filtering, hotspot weight ranking, current list push
+- ❌ Not Available: New news detection (🆕), trend tracking, incremental mode, daily summary accumulation, MCP AI analysis
+
+**Full Mode Description**:
+Configure remote cloud storage to unlock all features (see **Recommended Configuration: Remote Cloud Storage** below)
+
+**🚀 Recommended: Docker Deployment**
For long-term stable operation, we recommend [Docker Deployment](#6-docker-deployment), with data stored locally and no check-in required—though it does require purchasing a cloud server.
+</details>
+
---
-1. **Fork this project** to your GitHub account
+1️⃣ **Get project code**
+
+ Click the green **[Use this template]** button at the top right of this repository page → Select "Create a new repository".
- - Click the "Fork" button at the top right of this page
+ > ⚠️ Note:
+ > - Any mention of "Fork" in this document can be understood as "Use this template"
+ > - Using Fork may cause runtime issues, see [Issue #606](https://github.com/sansan0/TrendRadar/issues/606)
-2. **Setup GitHub Secrets (Required + Optional Platforms)**:
+2️⃣ **Setup GitHub Secrets (Required + Optional Platforms)**:
In your forked repo, go to `Settings` > `Secrets and variables` > `Actions` > `New repository secret`
**📌 Important Instructions (Please Read Carefully):**
- - ✅ **One Name for One Secret**: For each configuration item, click the "New repository secret" button once and fill in a pair of "Name" and "Secret"
- - ✅ **Cannot See Value After Saving is Normal**: For security reasons, after saving, you can only see the Name when re-editing, but not the Secret value
- - ⚠️ **DO NOT Create Custom Names**: The Secret Name must **strictly use** the names listed below (e.g., `WEWORK_WEBHOOK_URL`, `FEISHU_WEBHOOK_URL`, etc.). Do not modify or create new names arbitrarily, or the system will not recognize them
- - 💡 **Can Configure Multiple Platforms**: The system will send notifications to all configured platforms
+ - **One Name for One Secret**: For each configuration item, click the "New repository secret" button once and fill in a pair of "Name" and "Secret"
+ - **Cannot See Value After Saving is Normal**: For security reasons, after saving, you can only see the Name when re-editing, but not the Secret value
+ - **DO NOT Create Custom Names**: The Secret Name must **strictly use** the names listed below (e.g., `WEWORK_WEBHOOK_URL`, `FEISHU_WEBHOOK_URL`, etc.). Do not modify or create new names arbitrarily, or the system will not recognize them
+ - **Can Configure Multiple Platforms**: The system will send notifications to all configured platforms
- **📌 Multi-Account Push Notes (v3.5.0 New Feature):**
+<details>
+<summary>👉 Click to expand: <strong>Multi-Account Push Notes (v3.5.0 New Feature)</strong></summary>
+<br>
- - ✅ **Multi-Account Configuration Support**: All push channels (Feishu, DingTalk, WeWork, Telegram, ntfy, Bark, Slack) support configuring multiple accounts
- - ✅ **Configuration Method**: Use English semicolon `;` to separate multiple account values
- - ✅ **Example**: Set `FEISHU_WEBHOOK_URL` Secret value to `https://webhook1;https://webhook2`
- - ⚠️ **Paired Configuration**: Telegram and ntfy require paired parameter quantities to match (e.g., token and chat_id both have 2 values)
- - ⚠️ **Quantity Limit**: Default maximum 3 accounts per channel, exceeded values will be truncated
+- **Multi-Account Configuration Support**: All push channels (Feishu, DingTalk, WeWork, Telegram, ntfy, Bark, Slack) support configuring multiple accounts
+- **Configuration Method**: Use English semicolon `;` to separate multiple account values
+- **Example**: Set `FEISHU_WEBHOOK_URL` Secret value to `https://webhook1;https://webhook2`
+- **Paired Configuration**: Telegram and ntfy require paired parameter quantities to match (e.g., token and chat_id both have 2 values)
+- **Quantity Limit**: Default maximum 3 accounts per channel, exceeded values will be truncated
- **Multi-Account Configuration Examples**:
+**Multi-Account Configuration Examples**:
- | Name | Secret (Value) Example |
- |------|------------------------|
- | `FEISHU_WEBHOOK_URL` | `https://webhook1;https://webhook2;https://webhook3` |
- | `TELEGRAM_BOT_TOKEN` | `token1;token2` |
- | `TELEGRAM_CHAT_ID` | `chatid1;chatid2` |
- | `NTFY_TOPIC` | `topic1;topic2` |
- | `NTFY_TOKEN` | `;token2` (1st has no token, use empty string as placeholder) |
+| Name | Secret (Value) Example |
+|------|------------------------|
+| `FEISHU_WEBHOOK_URL` | `https://webhook1;https://webhook2;https://webhook3` |
+| `TELEGRAM_BOT_TOKEN` | `token1;token2` |
+| `TELEGRAM_CHAT_ID` | `chatid1;chatid2` |
+| `NTFY_TOPIC` | `topic1;topic2` |
+| `NTFY_TOKEN` | `;token2` (1st has no token, use empty string as placeholder) |
+
+</details>
**Configuration Example:**
@@ -929,628 +920,636 @@ For long-term stable operation, we recommend [Docker Deployment](#6-docker-deplo
<br>
- <details>
- <summary>⚠️ <strong>Required Configuration: Remote Cloud Storage</strong> (Required for GitHub Actions Environment, Cloudflare R2 Recommended)</summary>
- <br>
+<details>
+<summary>👉 Click to expand: <strong>Recommended Configuration: Remote Cloud Storage</strong></summary>
+<br>
- **GitHub Secret Configuration (⚠️ All 4 configuration items below are required):**
+**GitHub Secret Configuration:**
- | Name | Secret (Value) Description |
- |------|----------------------------|
- | `S3_BUCKET_NAME` | Bucket name (e.g., `trendradar-data`) |
- | `S3_ACCESS_KEY_ID` | Access key ID |
- | `S3_SECRET_ACCESS_KEY` | Access key |
- | `S3_ENDPOINT_URL` | S3 API endpoint (e.g., R2: `https://<account-id>.r2.cloudflarestorage.com`) |
+**Required Configuration (4 items):**
- <br>
+| Name | Secret (Value) Description |
+|------|----------------------------|
+| `S3_BUCKET_NAME` | Bucket name (e.g., `trendradar-data`) |
+| `S3_ACCESS_KEY_ID` | Access key ID |
+| `S3_SECRET_ACCESS_KEY` | Access key |
+| `S3_ENDPOINT_URL` | S3 API endpoint (e.g., R2: `https://<account-id>.r2.cloudflarestorage.com`) |
- **How to Get Credentials (Using Cloudflare R2 as Example):**
+**Optional Configuration:**
- 1. Visit [Cloudflare Dashboard](https://dash.cloudflare.com/) and log in
- 2. Select `R2` in left menu → Click `Create Bucket` → Enter name (e.g., `trendradar-data`)
- 3. Click `Manage R2 API Tokens` at top right → `Create API Token`
- 4. Select `Object Read & Write` permission → After creation, it will display `Access Key ID` and `Secret Access Key`
- 5. Endpoint URL can be found in bucket details page (format: `https://<account-id>.r2.cloudflarestorage.com`)
+| Name | Secret (Value) Description |
+|------|----------------------------|
+| `S3_REGION` | Region (default `auto`, some providers may require specification) |
- **Notes**:
- - R2 free tier: 10GB storage + 1 million reads per month, sufficient for this project
- - Activation requires binding a payment method (identity verification only, no charges)
- - Data stored in cloud, keeps GitHub repository clean
+> 💡 **More storage configuration options**: See [Storage Configuration Details](#11-storage-configuration-v400-new)
- </details>
+<br>
- <details>
- <summary> <strong>👉 Click to expand: WeWork Bot</strong> (Simplest and fastest configuration)</summary>
- <br>
+**How to Get Credentials (Using Cloudflare R2 as Example):**
- **GitHub Secret Configuration (⚠️ Name must match exactly):**
- - **Name**: `WEWORK_WEBHOOK_URL` (Please copy and paste this name, do not type manually to avoid typos)
- - **Secret (Value)**: Your WeWork bot Webhook address
+1. Visit [Cloudflare Dashboard](https://dash.cloudflare.com/) and log in
+2. Select `R2` in left menu → Click `Create Bucket` → Enter name (e.g., `trendradar-data`)
+3. Click `Manage R2 API Tokens` at top right → `Create API Token`
+4. Select `Object Read & Write` permission → After creation, it will display `Access Key ID` and `Secret Access Key`
+5. Endpoint URL can be found in bucket details page (format: `https://<account-id>.r2.cloudflarestorage.com`)
- <br>
+**Notes**:
+- Data stored in cloud, keeps GitHub repository clean
- **Bot Setup Steps:**
+</details>
- #### Mobile Setup:
- 1. Open WeWork App → Enter target internal group chat
- 2. Click "…" button at top right → Select "Message Push"
- 3. Click "Add" → Name input "TrendRadar"
- 4. Copy Webhook address, click save, paste the copied content into GitHub Secret above
+<details>
+<summary> <strong>👉 Click to expand: WeWork Bot</strong> (Simplest and fastest configuration)</summary>
+<br>
- #### PC Setup Process Similar
- </details>
+**GitHub Secret Configuration (⚠️ Name must match exactly):**
+- **Name**: `WEWORK_WEBHOOK_URL` (Please copy and paste this name, do not type manually to avoid typos)
+- **Secret (Value)**: Your WeWork bot Webhook address
- <details>
- <summary> <strong>👉 Click to expand: Personal WeChat Push</strong> (Based on WeWork app, push to personal WeChat)</summary>
- <br>
+<br>
- > This solution is based on WeWork's plugin mechanism. The push style is plain text (no markdown format), but it can push directly to personal WeChat without installing WeWork App.
+**Bot Setup Steps:**
- **GitHub Secret Configuration (⚠️ Name must match exactly):**
- - **Name**: `WEWORK_WEBHOOK_URL` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Your WeWork app Webhook address
+#### Mobile Setup:
+1. Open WeWork App → Enter target internal group chat
+2. Click "…" button at top right → Select "Message Push"
+3. Click "Add" → Name input "TrendRadar"
+4. Copy Webhook address, click save, paste the copied content into GitHub Secret above
- - **Name**: `WEWORK_MSG_TYPE` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: `text`
+#### PC Setup Process Similar
+</details>
- <br>
+<details>
+<summary> <strong>👉 Click to expand: Personal WeChat Push</strong> (Based on WeWork app, push to personal WeChat)</summary>
+<br>
- **Setup Steps:**
+> This solution is based on WeWork's plugin mechanism. The push style is plain text (no markdown format), but it can push directly to personal WeChat without installing WeWork App.
- 1. Complete the WeWork bot Webhook setup above
- 2. Add `WEWORK_MSG_TYPE` Secret with value `text`
- 3. Follow the image below to link personal WeChat
- 4. After configuration, WeWork App can be deleted from phone
+**GitHub Secret Configuration (⚠️ Name must match exactly):**
+- **Name**: `WEWORK_WEBHOOK_URL` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Your WeWork app Webhook address
- <img src="_image/wework.png" title="Personal WeChat Push Configuration"/>
+- **Name**: `WEWORK_MSG_TYPE` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: `text`
- **Notes**:
- - Uses the same Webhook address as WeWork bot
- - Difference is message format: `text` for plain text, `markdown` for rich text (default)
- - Plain text format will automatically remove all markdown syntax (bold, links, etc.)
+<br>
- </details>
+**Setup Steps:**
- <details>
- <summary> <strong>👉 Click to expand: Feishu Bot</strong> (Most user-friendly message display)</summary>
- <br>
+1. Complete the WeWork bot Webhook setup above
+2. Add `WEWORK_MSG_TYPE` Secret with value `text`
+3. Follow the image below to link personal WeChat
+4. After configuration, WeWork App can be deleted from phone
- **GitHub Secret Configuration (⚠️ Name must match exactly):**
- - **Name**: `FEISHU_WEBHOOK_URL` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Your Feishu bot Webhook address (link starts with https://www.feishu.cn/flow/api/trigger-webhook/********)
- <br>
+<img src="_image/wework.png" title="Personal WeChat Push Configuration"/>
- Two methods available, **Method 1** is simpler, **Method 2** is more complex (but stable push)
+**Notes**:
+- Uses the same Webhook address as WeWork bot
+- Difference is message format: `text` for plain text, `markdown` for rich text (default)
+- Plain text format will automatically remove all markdown syntax (bold, links, etc.)
- Method 1 discovered and suggested by **ziventian**, thanks to them. Default is personal push, group push can be configured via [#97](https://github.com/sansan0/TrendRadar/issues/97)
+</details>
- **Method 1:**
+<details>
+<summary> <strong>👉 Click to expand: Feishu Bot</strong> (Most user-friendly message display)</summary>
+<br>
- > For some users, additional operations needed to avoid "System Error". Need to search for the bot on mobile and enable Feishu bot application (suggestion from community, can refer)
+**GitHub Secret Configuration (⚠️ Name must match exactly):**
+- **Name**: `FEISHU_WEBHOOK_URL` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Your Feishu bot Webhook address (link starts with https://www.feishu.cn/flow/api/trigger-webhook/********)
+<br>
- 1. Open in PC browser https://botbuilder.feishu.cn/home/my-command
+Two methods available, **Method 1** is simpler, **Method 2** is more complex (but stable push)
- 2. Click "New Bot Command"
+Method 1 discovered and suggested by **ziventian**, thanks to them. Default is personal push, group push can be configured via [#97](https://github.com/sansan0/TrendRadar/issues/97)
- 3. Click "Select Trigger", scroll down, click "Webhook Trigger"
+**Method 1:**
- 4. Now you'll see "Webhook Address", copy this link to local notepad temporarily, continue with next steps
+> For some users, additional operations needed to avoid "System Error". Need to search for the bot on mobile and enable Feishu bot application (suggestion from community, can refer)
- 5. In "Parameters" put the following content, then click "Done"
+1. Open in PC browser https://botbuilder.feishu.cn/home/my-command
- ```json
- {
- "message_type": "text",
- "content": {
- "total_titles": "{{Content}}",
- "timestamp": "{{Content}}",
- "report_type": "{{Content}}",
- "text": "{{Content}}"
- }
- }
- ```
+2. Click "New Bot Command"
- 6. Click "Select Action" > "Send via Official Bot"
+3. Click "Select Trigger", scroll down, click "Webhook Trigger"
- 7. Message title fill "TrendRadar Trending Monitor"
+4. Now you'll see "Webhook Address", copy this link to local notepad temporarily, continue with next steps
- 8. Most critical part, click + button, select "Webhook Trigger", then arrange as shown in image
+5. In "Parameters" put the following content, then click "Done"
- ![Feishu Bot Config Example](_image/image.png)
+```json
+{
+ "message_type": "text",
+ "content": {
+ "total_titles": "{{Content}}",
+ "timestamp": "{{Content}}",
+ "report_type": "{{Content}}",
+ "text": "{{Content}}"
+ }
+}
+```
- 9. After configuration, put Webhook address from step 4 into GitHub Secrets `FEISHU_WEBHOOK_URL`
+6. Click "Select Action" > "Send via Official Bot"
- <br>
+7. Message title fill "TrendRadar Trending Monitor"
- **Method 2:**
+8. Most critical part, click + button, select "Webhook Trigger", then arrange as shown in image
- 1. Open in PC browser https://botbuilder.feishu.cn/home/my-app
+![Feishu Bot Config Example](_image/image.png)
- 2. Click "New Bot Application"
+9. After configuration, put Webhook address from step 4 into GitHub Secrets `FEISHU_WEBHOOK_URL`
- 3. After entering the created application, click "Process Design" > "Create Process" > "Select Trigger"
+<br>
- 4. Scroll down, click "Webhook Trigger"
+**Method 2:**
- 5. Now you'll see "Webhook Address", copy this link to local notepad temporarily, continue with next steps
+1. Open in PC browser https://botbuilder.feishu.cn/home/my-app
- 6. In "Parameters" put the following content, then click "Done"
+2. Click "New Bot Application"
- ```json
- {
- "message_type": "text",
- "content": {
- "total_titles": "{{Content}}",
- "timestamp": "{{Content}}",
- "report_type": "{{Content}}",
- "text": "{{Content}}"
- }
- }
- ```
+3. After entering the created application, click "Process Design" > "Create Process" > "Select Trigger"
- 7. Click "Select Action" > "Send Feishu Message", check "Group Message", then click the input box below, click "Groups I Manage" (if no group, you can create one in Feishu app)
+4. Scroll down, click "Webhook Trigger"
- 8. Message title fill "TrendRadar Trending Monitor"
+5. Now you'll see "Webhook Address", copy this link to local notepad temporarily, continue with next steps
- 9. Most critical part, click + button, select "Webhook Trigger", then arrange as shown in image
+6. In "Parameters" put the following content, then click "Done"
- ![Feishu Bot Config Example](_image/image.png)
+```json
+{
+ "message_type": "text",
+ "content": {
+ "total_titles": "{{Content}}",
+ "timestamp": "{{Content}}",
+ "report_type": "{{Content}}",
+ "text": "{{Content}}"
+ }
+}
+```
- 10. After configuration, put Webhook address from step 5 into GitHub Secrets `FEISHU_WEBHOOK_URL`
+7. Click "Select Action" > "Send Feishu Message", check "Group Message", then click the input box below, click "Groups I Manage" (if no group, you can create one in Feishu app)
- </details>
+8. Message title fill "TrendRadar Trending Monitor"
- <details>
- <summary> <strong>👉 Click to expand: DingTalk Bot</strong></summary>
- <br>
+9. Most critical part, click + button, select "Webhook Trigger", then arrange as shown in image
- **GitHub Secret Configuration (⚠️ Name must match exactly):**
- - **Name**: `DINGTALK_WEBHOOK_URL` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Your DingTalk bot Webhook address
+![Feishu Bot Config Example](_image/image.png)
- <br>
+10. After configuration, put Webhook address from step 5 into GitHub Secrets `FEISHU_WEBHOOK_URL`
- **Bot Setup Steps:**
-
- 1. **Create Bot (PC Only)**:
- - Open DingTalk PC client, enter target group chat
- - Click group settings icon (⚙️) → Scroll down to find "Bot" and click
- - Select "Add Bot" → "Custom"
+</details>
- 2. **Configure Bot**:
- - Set bot name
- - **Security Settings**:
- - **Custom Keywords**: Set "Trending" or "热点"
+<details>
+<summary> <strong>👉 Click to expand: DingTalk Bot</strong></summary>
+<br>
- 3. **Complete Setup**:
- - Check service terms agreement → Click "Done"
- - Copy the obtained Webhook URL
- - Put URL into GitHub Secrets `DINGTALK_WEBHOOK_URL`
+**GitHub Secret Configuration (⚠️ Name must match exactly):**
+- **Name**: `DINGTALK_WEBHOOK_URL` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Your DingTalk bot Webhook address
- **Note**: Mobile can only receive messages, cannot create new bots.
- </details>
+<br>
- <details>
- <summary> <strong>👉 Click to expand: Telegram Bot</strong></summary>
- <br>
+**Bot Setup Steps:**
- **GitHub Secret Configuration (⚠️ Name must match exactly):**
- - **Name**: `TELEGRAM_BOT_TOKEN` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Your Telegram Bot Token
+1. **Create Bot (PC Only)**:
+ - Open DingTalk PC client, enter target group chat
+ - Click group settings icon (⚙️) → Scroll down to find "Bot" and click
+ - Select "Add Bot" → "Custom"
- - **Name**: `TELEGRAM_CHAT_ID` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Your Telegram Chat ID
+2. **Configure Bot**:
+ - Set bot name
+ - **Security Settings**:
+ - **Custom Keywords**: Set "Trending" or "热点"
- **Note**: Telegram requires **two** Secrets, please click "New repository secret" button twice to add them separately
+3. **Complete Setup**:
+ - Check service terms agreement → Click "Done"
+ - Copy the obtained Webhook URL
+ - Put URL into GitHub Secrets `DINGTALK_WEBHOOK_URL`
- <br>
+**Note**: Mobile can only receive messages, cannot create new bots.
+</details>
- **Bot Setup Steps:**
+<details>
+<summary> <strong>👉 Click to expand: Telegram Bot</strong></summary>
+<br>
- 1. **Create Bot**:
- - Search `@BotFather` in Telegram (note case, has blue verification checkmark, shows ~37849827 monthly users, this is official, beware of fake accounts)
- - Send `/newbot` command to create new bot
- - Set bot name (must end with "bot", easily runs into duplicate names, so think creatively)
- - Get Bot Token (format like: `123456789:AAHfiqksKZ8WmR2zSjiQ7_v4TMAKdiHm9T0`)
+**GitHub Secret Configuration (⚠️ Name must match exactly):**
+- **Name**: `TELEGRAM_BOT_TOKEN` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Your Telegram Bot Token
- 2. **Get Chat ID**:
+- **Name**: `TELEGRAM_CHAT_ID` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Your Telegram Chat ID
- **Method 1: Via Official API**
- - First send a message to your bot
- - Visit: `https://api.telegram.org/bot<Your Bot Token>/getUpdates`
- - Find the number in `"chat":{"id":number}` in returned JSON
+**Note**: Telegram requires **two** Secrets, please click "New repository secret" button twice to add them separately
- **Method 2: Using Third-Party Tool**
- - Search `@userinfobot` and send `/start`
- - Get your user ID as Chat ID
+<br>
- 3. **Configure to GitHub**:
- - `TELEGRAM_BOT_TOKEN`: Fill in Bot Token from step 1
- - `TELEGRAM_CHAT_ID`: Fill in Chat ID from step 2
- </details>
+**Bot Setup Steps:**
- <details>
- <summary> <strong>👉 Click to expand: Email Push</strong> (Supports all mainstream email providers)</summary>
- <br>
+1. **Create Bot**:
+ - Search `@BotFather` in Telegram (note case, has blue verification checkmark, shows ~37849827 monthly users, this is official, beware of fake accounts)
+ - Send `/newbot` command to create new bot
+ - Set bot name (must end with "bot", easily runs into duplicate names, so think creatively)
+ - Get Bot Token (format like: `123456789:AAHfiqksKZ8WmR2zSjiQ7_v4TMAKdiHm9T0`)
- - Note: To prevent email bulk sending abuse, current bulk sending allows all recipients to see each other's email addresses.
- - If you haven't configured email sending before, not recommended to try
+2. **Get Chat ID**:
- > ⚠️ **Important Configuration Dependency**: Email push requires HTML report file. Make sure `formats.html` is set to `true` in `config/config.yaml`:
- > ```yaml
- > formats:
- > sqlite: true
- > txt: false
- > html: true # Must be enabled, otherwise email push will fail
- > ```
- > If set to `false`, email push will report error: `Error: HTML file does not exist or not provided: None`
+ **Method 1: Via Official API**
+ - First send a message to your bot
+ - Visit: `https://api.telegram.org/bot<Your Bot Token>/getUpdates`
+ - Find the number in `"chat":{"id":number}` in returned JSON
- <br>
+ **Method 2: Using Third-Party Tool**
+ - Search `@userinfobot` and send `/start`
+ - Get your user ID as Chat ID
- **GitHub Secret Configuration (⚠️ Name must match exactly):**
- - **Name**: `EMAIL_FROM` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Sender email address
+3. **Configure to GitHub**:
+ - `TELEGRAM_BOT_TOKEN`: Fill in Bot Token from step 1
+ - `TELEGRAM_CHAT_ID`: Fill in Chat ID from step 2
+</details>
- - **Name**: `EMAIL_PASSWORD` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Email password or authorization code
+<details>
+<summary> <strong>👉 Click to expand: Email Push</strong> (Supports all mainstream email providers)</summary>
+<br>
- - **Name**: `EMAIL_TO` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Recipient email address (multiple separated by comma, or can be same as EMAIL_FROM to send to yourself)
+- Note: To prevent email bulk sending abuse, current bulk sending allows all recipients to see each other's email addresses.
+- If you haven't configured email sending before, not recommended to try
- - **Name**: `EMAIL_SMTP_SERVER` (Optional, please copy and paste this name)
- - **Secret (Value)**: SMTP server address (leave empty for auto-detection)
+> ⚠️ **Important Configuration Dependency**: Email push requires HTML report file. Make sure `formats.html` is set to `true` in `config/config.yaml`:
+> ```yaml
+> formats:
+> sqlite: true
+> txt: false
+> html: true # Must be enabled, otherwise email push will fail
+> ```
+> If set to `false`, email push will report error: `Error: HTML file does not exist or not provided: None`
- - **Name**: `EMAIL_SMTP_PORT` (Optional, please copy and paste this name)
- - **Secret (Value)**: SMTP port (leave empty for auto-detection)
+<br>
- **Note**: Email push requires at least **3 required** Secrets (EMAIL_FROM, EMAIL_PASSWORD, EMAIL_TO), the last two are optional
+**GitHub Secret Configuration (⚠️ Name must match exactly):**
+- **Name**: `EMAIL_FROM` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Sender email address
- <br>
+- **Name**: `EMAIL_PASSWORD` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Email password or authorization code
- **Supported Email Providers** (Auto-detect SMTP config):
-
- | Provider | Domain | SMTP Server | Port | Encryption |
- |----------|--------|-------------|------|-----------|
- | **Gmail** | gmail.com | smtp.gmail.com | 587 | TLS |
- | **QQ Mail** | qq.com | smtp.qq.com | 465 | SSL |
- | **Outlook** | outlook.com | smtp-mail.outlook.com | 587 | TLS |
- | **Hotmail** | hotmail.com | smtp-mail.outlook.com | 587 | TLS |
- | **Live** | live.com | smtp-mail.outlook.com | 587 | TLS |
- | **163 Mail** | 163.com | smtp.163.com | 465 | SSL |
- | **126 Mail** | 126.com | smtp.126.com | 465 | SSL |
- | **Sina Mail** | sina.com | smtp.sina.com | 465 | SSL |
- | **Sohu Mail** | sohu.com | smtp.sohu.com | 465 | SSL |
- | **189 Mail** | 189.cn | smtp.189.cn | 465 | SSL |
- | **Aliyun Mail** | aliyun.com | smtp.aliyun.com | 465 | TLS |
-
- > **Auto-detect**: When using above emails, no need to manually configure `EMAIL_SMTP_SERVER` and `EMAIL_SMTP_PORT`, system auto-detects.
- >
- > **Feedback Notice**:
- > - If you successfully test with **other email providers**, please open an [Issue](https://github.com/sansan0/TrendRadar/issues) to let us know, we'll add to support list
- > - If above email configurations are incorrect or unusable, please also open an [Issue](https://github.com/sansan0/TrendRadar/issues) for feedback to help improve the project
- >
- > **Special Thanks**:
- > - Thanks to [@DYZYD](https://github.com/DYZYD) for contributing 189 Mail (189.cn) configuration and completing self-send-receive testing ([#291](https://github.com/sansan0/TrendRadar/issues/291))
- > - Thanks to [@longzhenren](https://github.com/longzhenren) for contributing Aliyun Mail (aliyun.com) configuration and completing testing ([#344](https://github.com/sansan0/TrendRadar/issues/344))
-
- **Common Email Settings:**
-
- #### QQ Mail:
- 1. Login QQ Mail web version → Settings → Account
- 2. Enable POP3/SMTP service
- 3. Generate authorization code (16-letter code)
- 4. `EMAIL_PASSWORD` fill authorization code, not QQ password
-
- #### Gmail:
- 1. Enable two-step verification
- 2. Generate app-specific password
- 3. `EMAIL_PASSWORD` fill app-specific password
-
- #### 163/126 Mail:
- 1. Login web version → Settings → POP3/SMTP/IMAP
- 2. Enable SMTP service
- 3. Set client authorization code
- 4. `EMAIL_PASSWORD` fill authorization code
- <br>
+- **Name**: `EMAIL_TO` (Please copy and paste this name, do not type manually)
+- **Secret (Value)**: Recipient email address (multiple separated by comma, or can be same as EMAIL_FROM to send to yourself)
- **Advanced Configuration**:
- If auto-detect fails, manually configure SMTP:
- - `EMAIL_SMTP_SERVER`: Like smtp.gmail.com
- - `EMAIL_SMTP_PORT`: Like 587 (TLS) or 465 (SSL)
- <br>
+- **Name**: `EMAIL_SMTP_SERVER` (Optional, please copy and paste this name)
+- **Secret (Value)**: SMTP server address (leave empty for auto-detection)
- **Multiple Recipients (note: English comma separator)**:
+- **Name**: `EMAIL_SMTP_PORT` (Optional, please copy and paste this name)
+- **Secret (Value)**: SMTP port (leave empty for auto-detection)
- </details>
+**Note**: Email push requires at least **3 required** Secrets (EMAIL_FROM, EMAIL_PASSWORD, EMAIL_TO), the last two are optional
- <details>
- <summary> <strong>👉 Click to expand: ntfy Push</strong> (Open-source, free, self-hostable)</summary>
- <br>
+<br>
- **Two Usage Methods:**
+**Supported Email Providers** (Auto-detect SMTP config):
+
+| Provider | Domain | SMTP Server | Port | Encryption |
+|----------|--------|-------------|------|-----------|
+| **Gmail** | gmail.com | smtp.gmail.com | 587 | TLS |
+| **QQ Mail** | qq.com | smtp.qq.com | 465 | SSL |
+| **Outlook** | outlook.com | smtp-mail.outlook.com | 587 | TLS |
+| **Hotmail** | hotmail.com | smtp-mail.outlook.com | 587 | TLS |
+| **Live** | live.com | smtp-mail.outlook.com | 587 | TLS |
+| **163 Mail** | 163.com | smtp.163.com | 465 | SSL |
+| **126 Mail** | 126.com | smtp.126.com | 465 | SSL |
+| **Sina Mail** | sina.com | smtp.sina.com | 465 | SSL |
+| **Sohu Mail** | sohu.com | smtp.sohu.com | 465 | SSL |
+| **189 Mail** | 189.cn | smtp.189.cn | 465 | SSL |
+| **Aliyun Mail** | aliyun.com | smtp.aliyun.com | 465 | TLS |
+| **Yandex Mail** | yandex.com | smtp.yandex.com | 465 | TLS |
+
+> **Auto-detect**: When using above emails, no need to manually configure `EMAIL_SMTP_SERVER` and `EMAIL_SMTP_PORT`, system auto-detects.
+>
+> **Feedback Notice**:
+> - If you successfully test with **other email providers**, please open an [Issue](https://github.com/sansan0/TrendRadar/issues) to let us know, we'll add to support list
+> - If above email configurations are incorrect or unusable, please also open an [Issue](https://github.com/sansan0/TrendRadar/issues) for feedback to help improve the project
+>
+> **Special Thanks**:
+> - Thanks to [@DYZYD](https://github.com/DYZYD) for contributing 189 Mail (189.cn) configuration and completing self-send-receive testing ([#291](https://github.com/sansan0/TrendRadar/issues/291))
+> - Thanks to [@longzhenren](https://github.com/longzhenren) for contributing Aliyun Mail (aliyun.com) configuration and completing testing ([#344](https://github.com/sansan0/TrendRadar/issues/344))
+> - Thanks to [@ACANX](https://github.com/ACANX) for contributing Yandex Mail (yandex.com) configuration and completing testing ([#663](https://github.com/sansan0/TrendRadar/issues/663))
+
+**Common Email Settings:**
+
+#### QQ Mail:
+1. Login QQ Mail web version → Settings → Account
+2. Enable POP3/SMTP service
+3. Generate authorization code (16-letter code)
+4. `EMAIL_PASSWORD` fill authorization code, not QQ password
+
+#### Gmail:
+1. Enable two-step verification
+2. Generate app-specific password
+3. `EMAIL_PASSWORD` fill app-specific password
+
+#### 163/126 Mail:
+1. Login web version → Settings → POP3/SMTP/IMAP
+2. Enable SMTP service
+3. Set client authorization code
+4. `EMAIL_PASSWORD` fill authorization code
+<br>
- ### Method 1: Free Use (Recommended for Beginners) 🆓
+**Advanced Configuration**:
+If auto-detect fails, manually configure SMTP:
+- `EMAIL_SMTP_SERVER`: Like smtp.gmail.com
+- `EMAIL_SMTP_PORT`: Like 587 (TLS) or 465 (SSL)
+<br>
- **Features**:
- - ✅ No account registration, use immediately
- - ✅ 250 messages/day (enough for 90% users)
- - ✅ Topic name is "password" (need to choose hard-to-guess name)
- - ⚠️ Messages unencrypted, not for sensitive info, but suitable for our non-sensitive project info
+**Multiple Recipients (note: English comma separator)**:
- **Quick Start:**
+</details>
- 1. **Download ntfy App**:
- - Android: [Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy) / [F-Droid](https://f-droid.org/en/packages/io.heckel.ntfy/)
- - iOS: [App Store](https://apps.apple.com/us/app/ntfy/id1625396347)
- - Desktop: Visit [ntfy.sh](https://ntfy.sh)
+<details>
+<summary> <strong>👉 Click to expand: ntfy Push</strong> (Open-source, free, self-hostable)</summary>
+<br>
- 2. **Subscribe to Topic** (choose a hard-to-guess name):
- ```
- Suggested format: trendradar-{your initials}-{random numbers}
+**Two Usage Methods:**
- Cannot use Chinese
+### Method 1: Free Use (Recommended for Beginners) 🆓
- ✅ Good example: trendradar-zs-8492
- ❌ Bad example: news, alerts (too easy to guess)
- ```
+**Features**:
+- ✅ No account registration, use immediately
+- ✅ 250 messages/day (enough for 90% users)
+- ✅ Topic name is "password" (need to choose hard-to-guess name)
+- ⚠️ Messages unencrypted, not for sensitive info, but suitable for our non-sensitive project info
- 3. **Configure GitHub Secret (⚠️ Name must match exactly)**:
- - **Name**: `NTFY_TOPIC` (Please copy and paste this name, do not type manually)
- - **Secret (Value)**: Fill in your subscribed topic name
+**Quick Start:**
- - **Name**: `NTFY_SERVER_URL` (Optional, please copy and paste this name)
- - **Secret (Value)**: Leave empty (default uses ntfy.sh)
+1. **Download ntfy App**:
+ - Android: [Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy) / [F-Droid](https://f-droid.org/en/packages/io.heckel.ntfy/)
+ - iOS: [App Store](https://apps.apple.com/us/app/ntfy/id1625396347)
+ - Desktop: Visit [ntfy.sh](https://ntfy.sh)
- - **Name**: `NTFY_TOKEN` (Optional, please copy and paste this name)
- - **Secret (Value)**: Leave empty
+2. **Subscribe to Topic** (choose a hard-to-guess name):
+ ```
+ Suggested format: trendradar-{your initials}-{random numbers}
- **Note**: ntfy requires at least 1 required Secret (NTFY_TOPIC), the last two are optional
+ Cannot use Chinese
- 4. **Test**:
- ```bash
- curl -d "Test message" ntfy.sh/your-topic-name
- ```
+ ✅ Good example: trendradar-zs-8492
+ ❌ Bad example: news, alerts (too easy to guess)
+ ```
- ---
+3. **Configure GitHub Secret (⚠️ Name must match exactly)**:
+ - **Name**: `NTFY_TOPIC` (Please copy and paste this name, do not type manually)
+ - **Secret (Value)**: Fill in your subscribed topic name
- ### Method 2: Self-Hosting (Complete Privacy Control) 🔒
+ - **Name**: `NTFY_SERVER_URL` (Optional, please copy and paste this name)
+ - **Secret (Value)**: Leave empty (default uses ntfy.sh)
- **Target Users**: Have server, pursue complete privacy, strong technical ability
+ - **Name**: `NTFY_TOKEN` (Optional, please copy and paste this name)
+ - **Secret (Value)**: Leave empty
- **Advantages**:
- - ✅ Completely open-source (Apache 2.0 + GPLv2)
- - ✅ Complete data self-control
- - ✅ No restrictions
- - ✅ Zero cost
+ **Note**: ntfy requires at least 1 required Secret (NTFY_TOPIC), the last two are optional
- **Docker One-Click Deploy**:
+4. **Test**:
```bash
- docker run -d \
- --name ntfy \
- -p 80:80 \
- -v /var/cache/ntfy:/var/cache/ntfy \
- binwiederhier/ntfy \
- serve --cache-file /var/cache/ntfy/cache.db
+ curl -d "Test message" ntfy.sh/your-topic-name
```
- **Configure TrendRadar**:
- ```yaml
- NTFY_SERVER_URL: https://ntfy.yourdomain.com
- NTFY_TOPIC: trendradar-alerts # Self-hosting can use simple name
- NTFY_TOKEN: tk_your_token # Optional: Enable access control
- ```
+---
- **Subscribe in App**:
- - Click "Use another server"
- - Enter your server address
- - Enter topic name
- - (Optional) Enter login credentials
+### Method 2: Self-Hosting (Complete Privacy Control) 🔒
- ---
+**Target Users**: Have server, pursue complete privacy, strong technical ability
- **FAQ:**
+**Advantages**:
+- ✅ Completely open-source (Apache 2.0 + GPLv2)
+- ✅ Complete data self-control
+- ✅ No restrictions
+- ✅ Zero cost
- <details>
- <summary><strong>Q1: Is the free version enough?</strong></summary>
+**Docker One-Click Deploy**:
+```bash
+docker run -d \
+ --name ntfy \
+ -p 80:80 \
+ -v /var/cache/ntfy:/var/cache/ntfy \
+ binwiederhier/ntfy \
+ serve --cache-file /var/cache/ntfy/cache.db
+```
- 250 messages/day is enough for most users. With 30-minute crawl intervals, about 48 pushes/day, completely sufficient.
- </details>
+**Configure TrendRadar**:
+```yaml
+NTFY_SERVER_URL: https://ntfy.yourdomain.com
+NTFY_TOPIC: trendradar-alerts # Self-hosting can use simple name
+NTFY_TOKEN: tk_your_token # Optional: Enable access control
+```
- <details>
- <summary><strong>Q2: Is the Topic name really secure?</strong></summary>
+**Subscribe in App**:
+- Click "Use another server"
+- Enter your server address
+- Enter topic name
+- (Optional) Enter login credentials
- If you choose a random, sufficiently long name (like `trendradar-zs-8492-news`), brute force is nearly impossible:
- - ntfy has strict rate limiting (1 request/second)
- - 64 character choices (A-Z, a-z, 0-9, _, -)
- - 10 random characters have 64^10 possibilities (would take years to crack)
- </details>
+---
- ---
+**FAQ:**
- **Recommended Choice:**
+<details>
+<summary><strong>Q1: Is the free version enough?</strong></summary>
- | User Type | Recommended | Reason |
- |-----------|-------------|--------|
- | Regular Users | Method 1 (Free) | Simple, fast, enough |
- | Technical Users | Method 2 (Self-Host) | Complete control, unlimited |
- | High-Frequency Users | Method 3 (Paid) | Check official website |
+250 messages/day is enough for most users. With 30-minute crawl intervals, about 48 pushes/day, completely sufficient.
+</details>
- **Related Links:**
- - [ntfy Official Docs](https://docs.ntfy.sh/)
- - [Self-Hosting Tutorial](https://docs.ntfy.sh/install/)
- - [GitHub Repository](https://github.com/binwiederhier/ntfy)
+<details>
+<summary><strong>Q2: Is the Topic name really secure?</strong></summary>
- </details>
+If you choose a random, sufficiently long name (like `trendradar-zs-8492-news`), brute force is nearly impossible:
+- ntfy has strict rate limiting (1 request/second)
+- 64 character choices (A-Z, a-z, 0-9, _, -)
+- 10 random characters have 64^10 possibilities (would take years to crack)
+</details>
- <details>
- <summary>👉 Click to expand: <strong>Bark Push</strong> (iOS exclusive, clean & efficient)</summary>
- <br>
+---
- **GitHub Secret Configuration (⚠️ Name must be exact):**
- - **Name**: `BARK_URL` (copy and paste this name, don't type manually)
- - **Secret**: Your Bark push URL
+**Recommended Choice:**
- <br>
+| User Type | Recommended | Reason |
+|-----------|-------------|--------|
+| Regular Users | Method 1 (Free) | Simple, fast, enough |
+| Technical Users | Method 2 (Self-Host) | Complete control, unlimited |
+| High-Frequency Users | Method 3 (Paid) | Check official website |
- **Bark Introduction:**
+**Related Links:**
+- [ntfy Official Docs](https://docs.ntfy.sh/)
+- [Self-Hosting Tutorial](https://docs.ntfy.sh/install/)
+- [GitHub Repository](https://github.com/binwiederhier/ntfy)
- Bark is a free open-source push tool for iOS platform, featuring simplicity, speed, and no ads.
+</details>
- **Usage Methods:**
+<details>
+<summary>👉 Click to expand: <strong>Bark Push</strong> (iOS exclusive, clean & efficient)</summary>
+<br>
- ### Method 1: Use Official Server (Recommended for beginners) 🆓
+**GitHub Secret Configuration (⚠️ Name must be exact):**
+- **Name**: `BARK_URL` (copy and paste this name, don't type manually)
+- **Secret**: Your Bark push URL
- 1. **Download Bark App**:
- - iOS: [App Store](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865)
+<br>
- 2. **Get Push URL**:
- - Open Bark App
- - Copy the push URL displayed on the home page (format: `https://api.day.app/your_device_key`)
- - Configure the URL to GitHub Secrets as `BARK_URL`
+**Bark Introduction:**
- ### Method 2: Self-Hosted Server (Complete Privacy Control) 🔒
+Bark is a free open-source push tool for iOS platform, featuring simplicity, speed, and no ads.
- **Suitable for**: Users with servers, pursuing complete privacy, strong technical skills
+**Usage Methods:**
- **Docker One-Click Deployment**:
- ```bash
- docker run -d \
- --name bark-server \
- -p 8080:8080 \
- finab/bark-server
- ```
+### Method 1: Use Official Server (Recommended for beginners) 🆓
- **Configure TrendRadar**:
- ```yaml
- BARK_URL: http://your-server-ip:8080/your_device_key
- ```
+1. **Download Bark App**:
+ - iOS: [App Store](https://apps.apple.com/us/app/bark-customed-notifications/id1403753865)
- ---
+2. **Get Push URL**:
+ - Open Bark App
+ - Copy the push URL displayed on the home page (format: `https://api.day.app/your_device_key`)
+ - Configure the URL to GitHub Secrets as `BARK_URL`
- **Notes:**
- - ✅ Bark uses APNs push, max 4KB per message
- - ✅ Supports automatic batch sending, no worry about long messages
- - ✅ Push format is plain text (automatically removes Markdown syntax)
- - ⚠️ Only supports iOS platform
+### Method 2: Self-Hosted Server (Complete Privacy Control) 🔒
- **Related Links:**
- - [Bark Official Website](https://bark.day.app/)
- - [Bark GitHub Repository](https://github.com/Finb/Bark)
- - [Bark Server Self-Hosting Tutorial](https://github.com/Finb/bark-server)
+**Suitable for**: Users with servers, pursuing complete privacy, strong technical skills
- </details>
+**Docker One-Click Deployment**:
+```bash
+docker run -d \
+ --name bark-server \
+ -p 8080:8080 \
+ finab/bark-server
+```
- <details>
- <summary>👉 Click to expand: <strong>Slack Push</strong></summary>
- <br>
+**Configure TrendRadar**:
+```yaml
+BARK_URL: http://your-server-ip:8080/your_device_key
+```
- **GitHub Secret Configuration (⚠️ Name must be exact):**
- - **Name**: `SLACK_WEBHOOK_URL` (copy and paste this name, don't type manually)
- - **Secret**: Your Slack Incoming Webhook URL
+---
- <br>
+**Notes:**
+- ✅ Bark uses APNs push, max 4KB per message
+- ✅ Supports automatic batch sending, no worry about long messages
+- ✅ Push format is plain text (automatically removes Markdown syntax)
+- ⚠️ Only supports iOS platform
- **Slack Introduction:**
+**Related Links:**
+- [Bark Official Website](https://bark.day.app/)
+- [Bark GitHub Repository](https://github.com/Finb/Bark)
+- [Bark Server Self-Hosting Tutorial](https://github.com/Finb/bark-server)
- Slack is a team collaboration tool, Incoming Webhooks can push messages to Slack channels.
+</details>
- **Setup Steps:**
+<details>
+<summary>👉 Click to expand: <strong>Slack Push</strong></summary>
+<br>
- ### Step 1: Create Slack App
+**GitHub Secret Configuration (⚠️ Name must be exact):**
+- **Name**: `SLACK_WEBHOOK_URL` (copy and paste this name, don't type manually)
+- **Secret**: Your Slack Incoming Webhook URL
- 1. **Visit Slack API Page**:
- - Open https://api.slack.com/apps?new_app=1
- - Login to your Slack workspace if not logged in
+<br>
- 2. **Choose Creation Method**:
- - Click **"From scratch"**
+**Slack Introduction:**
- 3. **Fill in App Information**:
- - **App Name**: Enter app name (e.g., `TrendRadar` or `Hot News Monitor`)
- - **Workspace**: Select your workspace from dropdown
- - Click **"Create App"** button
+Slack is a team collaboration tool, Incoming Webhooks can push messages to Slack channels.
- ### Step 2: Enable Incoming Webhooks
+**Setup Steps:**
- 1. **Navigate to Incoming Webhooks**:
- - Find and click **"Incoming Webhooks"** in left menu
+### Step 1: Create Slack App
- 2. **Enable Feature**:
- - Find **"Activate Incoming Webhooks"** toggle
- - Switch from `OFF` to `ON`
- - Page will auto-refresh showing new configuration options
+1. **Visit Slack API Page**:
+ - Open https://api.slack.com/apps?new_app=1
+ - Login to your Slack workspace if not logged in
- ### Step 3: Generate Webhook URL
+2. **Choose Creation Method**:
+ - Click **"From scratch"**
- 1. **Add New Webhook**:
- - Scroll to page bottom
- - Click **"Add New Webhook to Workspace"** button
+3. **Fill in App Information**:
+ - **App Name**: Enter app name (e.g., `TrendRadar` or `Hot News Monitor`)
+ - **Workspace**: Select your workspace from dropdown
+ - Click **"Create App"** button
- 2. **Select Target Channel**:
- - System will show authorization page
- - Select channel to receive messages from dropdown (e.g., `#hot-news`)
- - ⚠️ For private channels, must join the channel first
+### Step 2: Enable Incoming Webhooks
- 3. **Authorize App**:
- - Click **"Allow"** button to complete authorization
- - System will auto-redirect back to config page
+1. **Navigate to Incoming Webhooks**:
+ - Find and click **"Incoming Webhooks"** in left menu
- ### Step 4: Copy and Save Webhook URL
+2. **Enable Feature**:
+ - Find **"Activate Incoming Webhooks"** toggle
+ - Switch from `OFF` to `ON`
+ - Page will auto-refresh showing new configuration options
- 1. **View Generated URL**:
- - In "Webhook URLs for Your Workspace" section
- - You'll see the newly generated Webhook URL
- - Format: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`
+### Step 3: Generate Webhook URL
- 2. **Copy URL**:
- - Click **"Copy"** button on the right of URL
- - Or manually select and copy URL
+1. **Add New Webhook**:
+ - Scroll to page bottom
+ - Click **"Add New Webhook to Workspace"** button
- 3. **Configure to TrendRadar**:
- - **GitHub Actions**: Add URL to GitHub Secrets as `SLACK_WEBHOOK_URL`
- - **Local Testing**: Fill URL in `config/config.yaml` `slack_webhook_url` field
- - **Docker Deployment**: Add URL to `docker/.env` file as `SLACK_WEBHOOK_URL` variable
+2. **Select Target Channel**:
+ - System will show authorization page
+ - Select channel to receive messages from dropdown (e.g., `#hot-news`)
+ - ⚠️ For private channels, must join the channel first
- ---
+3. **Authorize App**:
+ - Click **"Allow"** button to complete authorization
+ - System will auto-redirect back to config page
- **Notes:**
- - ✅ Supports Markdown format (auto-converts to Slack mrkdwn)
- - ✅ Supports automatic batch sending (4KB per batch)
- - ✅ Suitable for team collaboration, centralized message management
- - ⚠️ Webhook URL contains secret key, never make it public
+### Step 4: Copy and Save Webhook URL
- **Message Format Preview:**
- ```
- *[Batch 1/2]*
+1. **View Generated URL**:
+ - In "Webhook URLs for Your Workspace" section
+ - You'll see the newly generated Webhook URL
+ - Format: `https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX`
- 📊 *Trending Topics Statistics*
+2. **Copy URL**:
+ - Click **"Copy"** button on the right of URL
+ - Or manually select and copy URL
- 🔥 *[1/3] AI ChatGPT* : 2 articles
+3. **Configure to TrendRadar**:
+ - **GitHub Actions**: Add URL to GitHub Secrets as `SLACK_WEBHOOK_URL`
+ - **Local Testing**: Fill URL in `config/config.yaml` `slack_webhook_url` field
+ - **Docker Deployment**: Add URL to `docker/.env` file as `SLACK_WEBHOOK_URL` variable
- 1. [Baidu Hot] 🆕 ChatGPT-5 Official Release *[1]* - 09:15 (1 time)
+---
- 2. [Toutiao] AI Chip Stocks Surge *[3]* - [08:30 ~ 10:45] (3 times)
- ```
+**Notes:**
+- ✅ Supports Markdown format (auto-converts to Slack mrkdwn)
+- ✅ Supports automatic batch sending (4KB per batch)
+- ✅ Suitable for team collaboration, centralized message management
+- ⚠️ Webhook URL contains secret key, never make it public
- **Related Links:**
- - [Slack Incoming Webhooks Official Docs](https://api.slack.com/messaging/webhooks)
- - [Slack API App Management](https://api.slack.com/apps)
+**Message Format Preview:**
+```
+*[Batch 1/2]*
- </details>
+📊 *Trending Topics Statistics*
- > **💡 Beginner Quick Start Tip**:
- >
- > For first deployment, suggest completing **GitHub Secrets** configuration first (choose one push platform), then jump to [Step 3] to test push success.
- >
- > **Don't modify** `config/config.yaml` and `frequency_words.txt` temporarily, adjust these configs after push test succeeds as needed.
+🔥 *[1/3] AI ChatGPT* : 2 articles
+ 1. [Baidu Hot] 🆕 ChatGPT-5 Official Release *[1]* - 09:15 (1 time)
-3. **Manual Test News Push**:
+ 2. [Toutiao] AI Chip Stocks Surge *[3]* - [08:30 ~ 10:45] (3 times)
+```
+
+**Related Links:**
+- [Slack Incoming Webhooks Official Docs](https://api.slack.com/messaging/webhooks)
+- [Slack API App Management](https://api.slack.com/apps)
+
+</details>
+
+> ⚠️ Note:
+> - For first deployment, suggest completing **GitHub Secrets** configuration first (choose one push platform), then jump to [Step 3] to test push success.
+> - **Don't modify** `config/config.yaml` and `frequency_words.txt` temporarily, adjust these configs after push test succeeds as needed.
- > 💡 **Complete Step 1-2 first, then test immediately!** Test success first, then adjust configuration (Step 4) as needed.
- >
- > ⚠️ **IMPORTANT: Enter your own forked project, not this project!**
+
+3️⃣ **Manual Test News Push**:
+
+ > ⚠️ Note:
+ > - Complete Step 1-2 first, then test immediately! Test success first, then adjust configuration (Step 4) as needed.
+ > - IMPORTANT: Enter your own forked project, not this project!
**How to find your Actions page**:
@@ -1568,44 +1567,42 @@ For long-term stable operation, we recommend [Docker Deployment](#6-docker-deplo
3. Click **"Run workflow"** button on the right to run
4. Wait about 1 minute, messages will be pushed to your configured platform
- > ⏱️ **Testing Tips**:
+ > ⚠️ Note:
> - Don't test too frequently to avoid triggering GitHub Actions limits
> - After clicking Run workflow, you need to **refresh the browser page** to see the new run record
-4. **Configuration Notes (Optional)**:
+4️⃣ **Configuration Notes (Optional)**:
- > 💡 **Default configuration works normally**, only adjust if you need personalization, understand these three files:
+ Default configuration works normally. Only adjust if you need personalization, understanding these three files:
- | File | Purpose |
- |------|---------|
- | `config/config.yaml` | Main config file: push mode, time window, platform list, hotspot weights, etc. |
- | `config/frequency_words.txt` | Keyword file: set your interested keywords, filter push content |
- | `.github/workflows/crawler.yml` | Execution frequency: control how often to run (⚠️ modify carefully) |
+ | File | Purpose |
+ |------|---------|
+ | `config/config.yaml` | Main config file: push mode, time window, platform list, hotspot weights, etc. |
+ | `config/frequency_words.txt` | Keyword file: set your interested keywords, filter push content |
+ | `.github/workflows/crawler.yml` | Execution frequency: control how often to run (⚠️ modify carefully) |
- 👉 **Detailed Configuration Tutorial**: [Configuration Guide](#configuration-guide)
+ 👉 **Detailed Configuration Tutorial**: [Configuration Guide](#configuration-guide)
-5. **🎉 Deployment Success! Share Your Experience**
+5️⃣ **🎉 Deployment Success! Share Your Experience**
- Congratulations on completing TrendRadar configuration! You can now start tracking trending news.
+ Congratulations on completing the TrendRadar configuration! You can now start tracking trending news.
- 💬 **Join our community to share your experience~**
+ 💬 Many users are sharing their experiences on the official account, we look forward to your insights~
- Want to learn more tips and advanced techniques?
- - Need quick help with issues?
+ - Need quick answers to problems?
- Have great ideas to share?
- 👉 **Follow our WeChat Official Account「硅基茶水间」(Silicon Tea Room)**, your likes and comments are the driving force for continuous updates!
+ 👉 Follow the WeChat Official Account「**[硅基茶水间](#-faq--support)**」, your likes and comments are the motivation for continuous updates.
- For detailed communication methods, please check → [FAQ & Support](#-faq--support)
-
-6. **🤖 Want Smarter Analysis? Try AI-Enhanced Features** (Optional)
+6️⃣ **🤖 Want Smarter Analysis? Try AI-Enhanced Features** (Optional)
Basic configuration already meets daily needs, but if you want:
- - 📊 Let AI automatically analyze trending topics and data insights
- - 🔍 Search and query news using natural language
- - 💡 Get sentiment analysis, topic prediction, and deep analytics
- - ⚡ Directly access data in AI tools like Claude, Cursor, etc.
+ - Let AI automatically analyze trending topics and data insights
+ - Search and query news using natural language
+ - Get sentiment analysis, topic prediction, and deep analytics
+ - Directly access data in AI tools like Claude, Cursor, etc.
👉 **Learn More**: [AI Analysis](#-ai-analysis) — Unlock hidden capabilities and make trend tracking more efficient!
@@ -3711,4 +3708,4 @@ GPL-3.0 License
[🔝 Back to Top](#trendradar)
-</div>
+</div>
\ No newline at end of file
diff --git a/README.md b/README.md
index e36833839a..9efbcd50d1 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,5 @@
<div align="center" id="trendradar">
-> **📢 公告:** **v4.0.0** 版本已发布!包含存储架构重构、数据库优化、模块化改进等重大更新
-
<a href="https://github.com/sansan0/TrendRadar" title="TrendRadar">
<img src="/_image/banner.webp" alt="TrendRadar Banner" width="80%">
</a>
@@ -15,7 +13,7 @@
[![GitHub Stars](https://img.shields.io/github/stars/sansan0/TrendRadar?style=flat-square&logo=github&color=yellow)](https://github.com/sansan0/TrendRadar/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/sansan0/TrendRadar?style=flat-square&logo=github&color=blue)](https://github.com/sansan0/TrendRadar/network/members)
[![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat-square)](LICENSE)
-[![Version](https://img.shields.io/badge/version-v4.0.0-blue.svg)](https://github.com/sansan0/TrendRadar)
+[![Version](https://img.shields.io/badge/version-v4.0.2-blue.svg)](https://github.com/sansan0/TrendRadar)
[![MCP](https://img.shields.io/badge/MCP-v1.1.0-green.svg)](https://github.com/sansan0/TrendRadar)
[![企业微信通知](https://img.shields.io/badge/企业微信-通知-00D4AA?style=flat-square)](https://work.weixin.qq.com/)
@@ -59,47 +57,15 @@
* **适用**:有自己的服务器、NAS 或长期运行的电脑。
-* 👉 [跳转到 Docker 部署教程](#6-docker-部署)
+👉 **[跳转到 Docker 部署教程](#6-docker-部署)**
---
#### 🅱️ 方案二:GitHub Actions 部署(已恢复 ✅)
-* **特点**:数据不再直接写入仓库(Git Commit),而是存储在 **远程云存储**(支持 S3 兼容协议:Cloudflare R2、阿里云 OSS、腾讯云 COS 等)。
-
-* **门槛**:**必须**配置一个 S3 兼容的对象存储服务(推荐免费的 Cloudflare R2)。
-
-> **⚠️ 注意**:选择此方案,请务必执行以下两步配置:
-
-#### 1. 🚀 推荐的开始方式:Use this template
-
-为了保持仓库整洁,避免继承冗余的历史记录,我**建议**你使用 Template 模式:
-
-1. **点击**原仓库页面右上角的绿色 **[Use this template]** 按钮。
-
-2. **选择** "Create a new repository"。
-
-> **💡 为什么要这样做?**
-> * **Use this template**:创建一个全新的、干净的仓库,没有历史包袱。
-> * **Fork**:会保留完整的提交历史和关联关系,占用 GitHub 更多资源。
-
-#### 2. ☁️ 关于 GitHub Actions 必配的远程存储
-
-如果你选择 **方案二 (GitHub Actions)**,则必须配置一个 S3 兼容的对象存储服务。
-
-**支持的存储服务:**
-- **Cloudflare R2**(推荐,免费额度充足)
-- 其他 S3 兼容服务
-
-**⚠️ 以 Cloudflare R2 为例的配置前置条件:**
-
-根据 Cloudflare 平台规则,开通 R2 需绑定支付方式。
-
-* **目的**:仅作身份验证(Verify Only),**不产生扣费**。
+* **特点**:数据不再直接写入仓库(Git Commit),而是存储在 **远程云存储**。
-* **支付**:支持双币信用卡或国区 PayPal。
-
-* **用量**:R2 的免费额度(10GB存储/月)足以覆盖本项目日常运行,无需担心付费。
+* **推荐**:配置一个远程云存储服务(Cloudflare R2、阿里云 OSS、腾讯云 COS 等)。
👉 **[点击查看详细配置教程](#-快速开始)**
@@ -902,61 +868,82 @@ frequency_words.txt 文件增加了一个【必须词】功能,使用 + 号
> **📖 提醒**:Fork 用户建议先 **[查看最新官方文档](https://github.com/sansan0/TrendRadar?tab=readme-ov-file)**,确保配置步骤是最新的。
-### ⚠️ GitHub Actions 使用说明
+1️⃣ **获取项目代码**
-**v4.0.0 重要变更**:引入「活跃度检测」机制,GitHub Actions 需定期签到以维持运行。
+ 点击本仓库页面右上角的绿色 **[Use this template]** 按钮 → 选择 "Create a new repository"。
-#### 🔄 签到续期机制
+ > ⚠️ 提醒:
+ > - 后续文档中提到的 "Fork" 均可理解为 "Use this template"
+ > - 使用 Fork 可能导致运行异常,详见 [Issue #606](https://github.com/sansan0/TrendRadar/issues/606)
-- **运行周期**:有效期为 **7 天**,倒计时结束后服务将自动挂起。
-- **续期方式**:在 Actions 页面手动触发 "Check In" workflow,即可重置 7 天有效期。
-- **操作路径**:`Actions` → `Check In` → `Run workflow`
-- **设计理念**:
- - 如果 7 天都忘了签到,或许这些资讯对你来说并非刚需。适时的暂停,能帮你从信息流中抽离,给大脑留出喘息的空间。
- - GitHub Actions 是宝贵的公共计算资源。引入签到机制旨在避免算力的无效空转,确保资源能分配给真正活跃且需要的用户。感谢你的理解与支持。
+2️⃣ **设置 GitHub Secrets(必需 + 可选平台)**:
-#### 📦 数据存储(必需配置)
+ 在你 Fork 后的仓库中,进入 `Settings` > `Secrets and variables` > `Actions` > `New repository secret`
-GitHub Actions 环境下,数据存储在 **远程云存储**(支持 S3 兼容协议,推荐免费的 Cloudflare R2),不会污染仓库(见下方 **必需配置:远程云存储**)
+ **⚠️ GitHub Actions 使用说明**
-#### 🚀 推荐:Docker 部署
+ **v4.0.0 重要变更**:引入「活跃度检测」机制,GitHub Actions 需定期签到以维持运行。
-如需长期稳定运行,建议使用 [Docker 部署](#6-docker-部署),数据存储在本地,无需签到,不过需要额外付费购买云服务器。
+ **🔄 签到续期机制**:
+ - **运行周期**:有效期为 **7 天**,倒计时结束后服务将自动挂起。
+ - **续期方式**:在 Actions 页面手动触发 "Check In" workflow,即可重置 7 天有效期。
+ - **操作路径**:`Actions` → `Check In` → `Run workflow`
+ - **设计理念**:
+ - 如果 7 天都忘了签到,或许这些资讯对你来说并非刚需。适时的暂停,能帮你从信息流中抽离,给大脑留出喘息的空间。
+ - GitHub Actions 是宝贵的公共计算资源。引入签到机制旨在避免算力的无效空转,确保资源能分配给真正活跃且需要的用户。感谢你的理解与支持。
----
+ **📌 重要说明(请务必仔细阅读):**
-1. **Fork 本项目**到你的 GitHub 账户
+ - **一个 Name 对应一个 Secret**:每添加一个配置项,点击一次"New repository secret"按钮,填写一对"Name"和"Secret"
+ - **保存后看不到值是正常的**:出于安全考虑,保存后重新编辑时,只能看到 Name(名称),看不到 Secret(值)的内容
+ - **严禁自创名称**:Secret 的 Name(名称)必须**严格使用**下方列出的名称(如 `WEWORK_WEBHOOK_URL`、`FEISHU_WEBHOOK_URL` 等),不能自己随意修改或创造新名称,否则系统无法识别
+ - **可以同时配置多个平台**:系统会向所有配置的平台发送通知
- - 点击本页面右上角的"Fork"按钮
+ <details>
+ <summary>👉 点击展开:<strong>轻量模式 vs 完整模式 + AI分析</strong></summary>
+ <br>
-2. **设置 GitHub Secrets(必需 + 可选平台)**:
+**两种部署模式:**
- 在你 Fork 后的仓库中,进入 `Settings` > `Secrets and variables` > `Actions` > `New repository secret`
+| 模式 | 配置要求 | 功能范围 |
+|------|---------|---------|
+| **轻量模式** | 无需配置存储 | 实时抓取 + 关键词筛选 + 多渠道推送 |
+| **完整模式** | 配置远程云存储 | 轻量模式 + 新增检测 + 趋势追踪 + 增量推送 + AI分析 |
- **📌 重要说明(请务必仔细阅读):**
+**轻量模式说明**:
+- ✅ 可用:实时新闻抓取、关键词筛选、热点权重排序、当前榜单推送
+- ❌ 不可用:新增新闻检测(🆕)、热度趋势追踪、增量模式、每日汇总累积、MCP AI分析
- - ✅ **一个 Name 对应一个 Secret**:每添加一个配置项,点击一次"New repository secret"按钮,填写一对"Name"和"Secret"
- - ✅ **保存后看不到值是正常的**:出于安全考虑,保存后重新编辑时,只能看到 Name(名称),看不到 Secret(值)的内容
- - ⚠️ **严禁自创名称**:Secret 的 Name(名称)必须**严格使用**下方列出的名称(如 `WEWORK_WEBHOOK_URL`、`FEISHU_WEBHOOK_URL` 等),不能自己随意修改或创造新名称,否则系统无法识别
- - 💡 **可以同时配置多个平台**:系统会向所有配置的平台发送通知
+**完整模式说明**:
+配置远程云存储后解锁全部功能(见下方 **推荐配置:远程云存储**)
- **📌 多账号推送说明(v3.5.0 新增):**
+**🚀 推荐:Docker 部署**
- - ✅ **支持多账号配置**:所有推送渠道(飞书、钉钉、企业微信、Telegram、ntfy、Bark、Slack)均支持配置多个账号
- - ✅ **配置方式**:使用英文分号 `;` 分隔多个账号值
- - ✅ **示例**:`FEISHU_WEBHOOK_URL` 的 Secret 值填写 `https://webhook1;https://webhook2`
- - ⚠️ **配对配置**:Telegram 和 ntfy 需要保证配对参数数量一致(如 token 和 chat_id 都是 2 个)
- - ⚠️ **数量限制**:默认每个渠道最多 3 个账号,超出部分被截断
+如需长期稳定运行,建议使用 [Docker 部署](#6-docker-部署),数据存储在本地,无需签到,不过需要额外付费购买云服务器。
- **多账号配置示例**:
+ </details>
- | Name(名称) | Secret(值)示例 |
- |-------------|-----------------|
- | `FEISHU_WEBHOOK_URL` | `https://webhook1;https://webhook2;https://webhook3` |
- | `TELEGRAM_BOT_TOKEN` | `token1;token2` |
- | `TELEGRAM_CHAT_ID` | `chatid1;chatid2` |
- | `NTFY_TOPIC` | `topic1;topic2` |
- | `NTFY_TOKEN` | `;token2`(第一个无 token 时留空占位) |
+ <details>
+ <summary>👉 点击展开:<strong>多账号推送说明(v3.5.0 新增)</strong></summary>
+ <br>
+
+- **支持多账号配置**:所有推送渠道(飞书、钉钉、企业微信、Telegram、ntfy、Bark、Slack)均支持配置多个账号
+- **配置方式**:使用英文分号 `;` 分隔多个账号值
+- **示例**:`FEISHU_WEBHOOK_URL` 的 Secret 值填写 `https://webhook1;https://webhook2`
+- **配对配置**:Telegram 和 ntfy 需要保证配对参数数量一致(如 token 和 chat_id 都是 2 个)
+- **数量限制**:默认每个渠道最多 3 个账号,超出部分被截断
+
+**多账号配置示例**:
+
+| Name(名称) | Secret(值)示例 |
+|-------------|-----------------|
+| `FEISHU_WEBHOOK_URL` | `https://webhook1;https://webhook2;https://webhook3` |
+| `TELEGRAM_BOT_TOKEN` | `token1;token2` |
+| `TELEGRAM_CHAT_ID` | `chatid1;chatid2` |
+| `NTFY_TOPIC` | `topic1;topic2` |
+| `NTFY_TOKEN` | `;token2`(第一个无 token 时留空占位) |
+
+ </details>
**配置示例:**
@@ -969,50 +956,61 @@ GitHub Actions 环境下,数据存储在 **远程云存储**(支持 S3 兼
<br>
<details>
- <summary>⚠️ <strong>必需配置:远程云存储</strong>(GitHub Actions 环境必需,推荐 Cloudflare R2)</summary>
+ <summary>👉 点击展开:<strong>推荐配置:远程云存储</strong></summary>
<br>
- **GitHub Secret 配置(⚠️ 以下 4 个配置项都是必需的):**
+**⚠️ 以 Cloudflare R2 为例的配置前置条件:**
- | Name(名称) | Secret(值)说明 |
- |-------------|-----------------|
- | `S3_BUCKET_NAME` | 存储桶名称(如 `trendradar-data`) |
- | `S3_ACCESS_KEY_ID` | 访问密钥 ID(Access Key ID) |
- | `S3_SECRET_ACCESS_KEY` | 访问密钥(Secret Access Key) |
- | `S3_ENDPOINT_URL` | S3 API 端点(如 R2:`https://<account-id>.r2.cloudflarestorage.com`) |
+根据 Cloudflare 平台规则,开通 R2 需绑定支付方式。
+
+* **目的**:仅作身份验证(Verify Only),**不产生扣费**。
+* **支付**:支持双币信用卡或国区 PayPal。
+* **用量**:R2 的免费额度(10GB存储/月)足以覆盖本项目日常运行,无需担心付费。
+
+---
+
+**GitHub Secret 配置:**
+
+**必需配置(4 项):**
- <br>
+| Name(名称) | Secret(值)说明 |
+|-------------|-----------------|
+| `S3_BUCKET_NAME` | 存储桶名称(如 `trendradar-data`) |
+| `S3_ACCESS_KEY_ID` | 访问密钥 ID(Access Key ID) |
+| `S3_SECRET_ACCESS_KEY` | 访问密钥(Secret Access Key) |
+| `S3_ENDPOINT_URL` | S3 API 端点(如 R2:`https://<account-id>.r2.cloudflarestorage.com`) |
- **如何获取凭据(以 Cloudflare R2 为例):**
+**可选配置:**
- 1. **进入 R2 概览**:
- - 登录 [Cloudflare Dashboard](https://dash.cloudflare.com/)。
- - 在左侧侧边栏找到并点击 `R2对象存储`。
+| Name(名称) | Secret(值)说明 |
+|-------------|-----------------|
+| `S3_REGION` | 区域(默认 `auto`,部分服务商可能需要指定) |
- <br>
+> 💡 **更多存储配置选项**:参见 [存储配置详解](#11-存储配置)
- 2. **创建存储桶**:
- - 点击`概述`
- - 点击右上角的 `创建存储桶` (Create bucket)。
- - 输入名称(例如 `trendradar-data`),点击 `创建存储桶`。
+<br>
- <br>
+**如何获取凭据(以 Cloudflare R2 为例):**
- 3. **创建 API 令牌**:
- - 回到 **概述**页面。
- - 点击**右下角** `Account Details `找到并点击 `Manage` (Manage R2 API Tokens)。
- - 同时你会看到 `S3 API`:`https://<account-id>.r2.cloudflarestorage.com`(这就是 S3_ENDPOINT_URL)
- - 点击 `创建 Account APl 令牌` 。
- - **⚠️ 关键设置**:
- - **令牌名称**:随意填写(如 `github-action-write`)。
- - **权限**:选择 `管理员读和写` 。
- - **指定存储桶**:为了安全,建议选择 `仅适用于指定存储桶` 并选中你的桶(如 `trendradar-data`)。
- - 点击 `创建 API 令牌`,**立即复制** 显示的 `Access Key ID` 和 `Secret Access Key`(只显示一次!)。
+1. **进入 R2 概览**:
+ - 登录 [Cloudflare Dashboard](https://dash.cloudflare.com/)。
+ - 在左侧侧边栏找到并点击 `R2对象存储`。
- <br>
+2. **创建存储桶**:
+ - 点击`概述`
+ - 点击右上角的 `创建存储桶` (Create bucket)。
+ - 输入名称(例如 `trendradar-data`),点击 `创建存储桶`。
- - **R2 免费额度**:每月 10GB 存储 + 100万次读取,对本项目来说非常充足。
- - **支付验证**:开通 R2 即使是免费额度,Cloudflare 也要求绑定 PayPal 或信用卡进行身份验证(不会实际扣费,除非超过额度)。
+3. **创建 API 令牌**:
+ - 回到 **概述**页面。
+ - 点击**右下角** `Account Details `找到并点击 `Manage` (Manage R2 API Tokens)。
+ - 同时你会看到 `S3 API`:`https://<account-id>.r2.cloudflarestorage.com`(这就是 S3_ENDPOINT_URL)
+ - 点击 `创建 Account APl 令牌` 。
+ - **⚠️ 关键设置**:
+ - **令牌名称**:随意填写(如 `github-action-write`)。
+ - **权限**:选择 `管理员读和写` 。
+ - **指定存储桶**:为了安全,建议选择 `仅适用于指定存储桶` 并选中你的桶(如 `trendradar-data`)。
+ - 点击 `创建 API 令牌`,**立即复制** 显示的 `Access Key ID` 和 `Secret Access Key`(只显示一次!)。
</details>
@@ -1279,6 +1277,7 @@ GitHub Actions 环境下,数据存储在 **远程云存储**(支持 S3 兼
| **搜狐邮箱** | sohu.com | smtp.sohu.com | 465 | SSL |
| **天翼邮箱** | 189.cn | smtp.189.cn | 465 | SSL |
| **阿里云邮箱** | aliyun.com | smtp.aliyun.com | 465 | TLS |
+ | **Yandex邮箱** | yandex.com | smtp.yandex.com | 465 | TLS |
> **自动识别**:使用以上邮箱时,无需手动配置 `EMAIL_SMTP_SERVER` 和 `EMAIL_SMTP_PORT`,系统会自动识别。
>
@@ -1289,6 +1288,7 @@ GitHub Actions 环境下,数据存储在 **远程云存储**(支持 S3 兼
> **特别感谢**:
> - 感谢 [@DYZYD](https://github.com/DYZYD) 贡献天翼邮箱(189.cn)配置并完成自发自收测试 ([#291](https://github.com/sansan0/TrendRadar/issues/291))
> - 感谢 [@longzhenren](https://github.com/longzhenren) 贡献阿里云邮箱(aliyun.com)配置并完成测试 ([#344](https://github.com/sansan0/TrendRadar/issues/344))
+ > - 感谢 [@ACANX](https://github.com/ACANX) 贡献 Yandex 邮箱(yandex.com)配置并完成测试 ([#663](https://github.com/sansan0/TrendRadar/issues/663))
**常见邮箱设置:**
@@ -1596,11 +1596,11 @@ GitHub Actions 环境下,数据存储在 **远程云存储**(支持 S3 兼
</details>
-3. **手动测试新闻推送**:
+3️⃣ **手动测试新闻推送**:
- > 💡 **完成第1-2步后,请立即测试!** 测试成功后再根据需要调整配置(第4步)。
- >
- > ⚠️ **重要提醒:请进入你自己 fork 的项目,不是本项目!**
+ > ⚠️ 提醒:
+ > - 完成第 1-2 步后,请立即测试!测试成功后再根据需要调整配置(第 4 步)
+ > - 请进入你自己的项目,不是本项目!
**如何找到你的 Actions 页面**:
@@ -1619,44 +1619,42 @@ GitHub Actions 环境下,数据存储在 **远程云存储**(支持 S3 兼
<br>
- > ⏱️ **测试提示**:
+ > ⚠️ 提醒:
> - 手动测试不要太频繁,避免触发 GitHub Actions 限制
- > - 点击 Run workflow 后需要**刷新浏览器页面**才能看到新的运行记录
+ > - 点击 Run workflow 后需要刷新浏览器页面才能看到新的运行记录
-4. **配置说明(可选)**:
+4️⃣ **配置说明(可选)**:
- > 💡 **默认配置已可正常使用**,如需个性化调整,了解以下三个文件即可
+ 默认配置已可正常使用,如需个性化调整,了解以下三个文件即可:
- | 文件 | 作用 |
- |------|------|
- | `config/config.yaml` | 主配置文件:推送模式、时间窗口、平台列表、热点权重等 |
- | `config/frequency_words.txt` | 关键词文件:设置你关心的词汇,筛选推送内容 |
- | `.github/workflows/crawler.yml` | 执行频率:控制多久运行一次(⚠️ 谨慎修改) |
+ | 文件 | 作用 |
+ |------|------|
+ | `config/config.yaml` | 主配置文件:推送模式、时间窗口、平台列表、热点权重等 |
+ | `config/frequency_words.txt` | 关键词文件:设置你关心的词汇,筛选推送内容 |
+ | `.github/workflows/crawler.yml` | 执行频率:控制多久运行一次(⚠️ 谨慎修改) |
- 👉 **详细配置教程**:[配置详解](#配置详解)
+ 👉 **详细配置教程**:[配置详解](#配置详解)
-5. **🎉 部署成功!分享你的使用体验**
+5️⃣ **🎉 部署成功!分享你的使用体验**
恭喜你完成了 TrendRadar 的配置!现在你可以开始追踪热点资讯了。
- 💬 **有更多小伙伴在公众号交流使用心得,期待你的分享~**
+ 💬 有更多小伙伴在公众号交流使用心得,期待你的分享~
- 想了解更多玩法和高级技巧?
- 遇到问题需要快速解答?
- 有好的想法想要交流?
- 👉 **欢迎关注公众号「硅基茶水间」**,你的点赞和留言都是项目持续更新的动力。
-
- 详细的交流方式,请查看 → [问题答疑与交流](#问题答疑与交流)
+ 👉 欢迎关注公众号「**[硅基茶水间](#问题答疑与交流)**」,你的点赞和留言都是项目持续更新的动力。
-6. **想要更智能的分析?试试 AI 增强功能**(可选)
+6️⃣ **想要更智能的分析?试试 AI 增强功能**(可选)
基础配置已经能满足日常使用,但如果你想要:
- - 📊 让 AI 自动分析热点趋势和数据洞察
- - 🔍 通过自然语言搜索和查询新闻
- - 💡 获得情感分析、话题预测等深度分析
- - ⚡ 在 Claude、Cursor 等 AI 工具中直接调用数据
+ - 让 AI 自动分析热点趋势和数据洞察
+ - 通过自然语言搜索和查询新闻
+ - 获得情感分析、话题预测等深度分析
+ - 在 Claude、Cursor 等 AI 工具中直接调用数据
👉 **了解更多**:[AI 智能分析](#-ai-智能分析) — 解锁项目的隐藏能力,让热点追踪更高效!
diff --git a/trendradar/storage/remote.py b/trendradar/storage/remote.py
index 509eb696cc..cf0bb0c919 100644
--- a/trendradar/storage/remote.py
+++ b/trendradar/storage/remote.py
@@ -7,8 +7,6 @@
数据流程:下载当天 SQLite → 合并新数据 → 上传回远程
"""
-import atexit
-import os
import pytz
import re
import shutil
@@ -17,7 +15,7 @@ import tempfile
import sqlite3
from datetime import datetime, timedelta
from pathlib import Path
-from typing import Dict, List, Optional, Any
+from typing import Dict, List, Optional
try:
import boto3
@@ -94,10 +92,10 @@ class RemoteStorageBackend(StorageBackend):
# 初始化 S3 客户端
# 使用 virtual-hosted style addressing(主流)
# 根据服务商选择签名版本:
- # - Cloudflare R2 只支持 SigV4
- # - 腾讯云 COS 等使用 SigV2 以避免 chunked encoding 问题
- is_cloudflare_r2 = "r2.cloudflarestorage.com" in endpoint_url.lower()
- signature_version = 's3v4' if is_cloudflare_r2 else 's3'
+ # - 腾讯云 COS 使用 SigV2 以避免 chunked encoding 问题
+ # - 其他服务商(AWS S3、Cloudflare R2、阿里云 OSS、MinIO 等)默认使用 SigV4
+ is_tencent_cos = "myqcloud.com" in endpoint_url.lower()
+ signature_version = 's3' if is_tencent_cos else 's3v4'
s3_config = BotoConfig(
s3={"addressing_style": "virtual"},
@@ -257,7 +255,7 @@ class RemoteStorageBackend(StorageBackend):
Key=r2_key,
Body=file_content,
ContentLength=local_size,
- ContentType='application/octet-stream',
+ ContentType='application/x-sqlite3',
)
print(f"[远程存储] 已上传: {local_path} -> {r2_key}")