Skip to content

Commit 025bbcd

Browse files
committed
v3.2.0: 新增关键词排序优先级配置,显示数量控制
1 parent 4abc218 commit 025bbcd

File tree

8 files changed

+328
-55
lines changed

8 files changed

+328
-55
lines changed

README-EN.md

Lines changed: 131 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center" id="trendradar">
22

33
<a href="https://github.com/sansan0/TrendRadar" title="TrendRadar">
4-
<img src="/_image/banner.webp" alt="TrendRadar Banner" width="80%">
4+
<img src="/_image/banner.webp" alt="TrendRadar Banner" width="90%">
55
</a>
66

77
🚀 Deploy in <strong>30 seconds</strong> — Your Smart Trending News Assistant
@@ -13,7 +13,7 @@
1313
[![GitHub Stars](https://img.shields.io/github/stars/sansan0/TrendRadar?style=flat-square&logo=github&color=yellow)](https://github.com/sansan0/TrendRadar/stargazers)
1414
[![GitHub Forks](https://img.shields.io/github/forks/sansan0/TrendRadar?style=flat-square&logo=github&color=blue)](https://github.com/sansan0/TrendRadar/network/members)
1515
[![License](https://img.shields.io/badge/license-GPL--3.0-blue.svg?style=flat-square)](LICENSE)
16-
[![Version](https://img.shields.io/badge/version-v3.1.1-blue.svg)](https://github.com/sansan0/TrendRadar)
16+
[![Version](https://img.shields.io/badge/version-v3.2.0-blue.svg)](https://github.com/sansan0/TrendRadar)
1717
[![MCP](https://img.shields.io/badge/MCP-v1.0.2-green.svg)](https://github.com/sansan0/TrendRadar)
1818

1919
[![WeWork](https://img.shields.io/badge/WeWork-Notification-00D4AA?style=flat-square)](https://work.weixin.qq.com/)
@@ -45,10 +45,9 @@
4545

4646
<div align="center">
4747

48-
| [🎯 Core Features](#-core-features) | [🚀 Quick Start](#-quick-start) | [⚙️ Configuration Guide](#-configuration-guide) | [🐳 Docker Deployment](#-docker-deployment) |
49-
|:---:|:---:|:---:|:---:|
50-
| [🤖 AI Analysis](#-ai-analysis) | [🔌 MCP Clients](#-mcp-clients) | [📝 Changelog](#-changelog) | [❓ FAQ & Support](#-faq--support) |
51-
| [⭐ Related Projects](#-related-projects) | [🪄 Sponsors](#-sponsors) | | |
48+
| [🚀 Quick Start](#-quick-start) | [🤖 AI Analysis](#-ai-analysis) | [⚙️ Configuration Guide](#configuration-guide) | [📝 Changelog](#-changelog) | [❓ FAQ & Support](#-faq--support) |
49+
|:---:|:---:|:---:|:---:|:---:|
50+
| [🐳 Docker Deployment](#-docker-deployment) | [🔌 MCP Clients](#-mcp-clients) | [⭐ Related Projects](#-related-projects) | [🪄 Sponsors](#-sponsors) | |
5251

5352
</div>
5453

@@ -162,10 +161,23 @@ Default monitoring of 11 mainstream platforms, with support for adding custom pl
162161

163162
Set personal keywords (e.g., AI, BYD, Education Policy) to receive only relevant trending news, filtering out noise.
164163

165-
- Supports normal words, required words (+), and filter words (!)
166-
- Group-based management with independent statistics for different topics
164+
**Basic Syntax** (4 types):
165+
- Normal words: Basic matching
166+
- Required words `+`: Narrow scope
167+
- Filter words `!`: Exclude noise
168+
- Count limit `@`: Control display count (v3.2.0 new)
167169

168-
> 💡 Keyword configuration tutorial: [Configuration Guide - Keyword Configuration](#2-keyword-configuration)
170+
**Advanced Features** (v3.2.0 new):
171+
- 🔢 **Keyword Sorting Control**: Sort by popularity or config order
172+
- 📊 **Display Count Limit**: Global config + individual override for flexible control
173+
174+
**Group-based Management**:
175+
- Separate with blank lines, independent statistics for different topics
176+
177+
> 💡 **Basic Configuration**: [Keyword Configuration - Basic Syntax](#keyword-basic-syntax)
178+
>
179+
> 💡 **Advanced Configuration**: [Keyword Configuration - Advanced Settings](#keyword-advanced-settings)
180+
>
169181
> 💡 You can also skip filtering and receive all trending news (leave frequency_words.txt empty)
170182
171183

@@ -251,6 +263,30 @@ Transform from "algorithm recommendation captivity" to "actively getting the inf
251263
- **Major Version Upgrade**: Upgrading from v1.x to v2.y, recommend deleting existing fork and re-forking to save effort and avoid config conflicts
252264

253265

266+
### 2025/11/23 - v3.2.0
267+
268+
**🎯 New Advanced Customization Features**
269+
270+
1. **Keyword Sorting Priority Configuration**
271+
- Two sorting strategies: Popularity first vs Config order first
272+
- For different use cases: Hot topic tracking or personalized focus
273+
274+
2. **Display Count Precise Control**
275+
- Global config: Unified limit for all keywords
276+
- Individual config: Use `@number` syntax to set specific limits
277+
- Effectively control push length, highlight key content
278+
279+
> 📖 **Detailed Tutorial**: [Keyword Configuration - Advanced Settings](#keyword-advanced-settings)
280+
281+
**🔧 Upgrade Instructions**:
282+
- **GitHub Fork Users**: Update `main.py`, `config/config.yaml`
283+
284+
### 2025/11/18 - mcp-v1.0.2
285+
286+
**MCP Module Update:**
287+
- Fix issue where today's news query may return articles from past dates
288+
289+
254290
### 2025/11/22 - v3.1.1
255291

256292
- **Fixed data anomaly crash issue**: Resolved `'float' object has no attribute 'lower'` error encountered by some users in GitHub Actions environment
@@ -1076,6 +1112,8 @@ frequency_words.txt file added **required word** feature, using + sign
10761112
👉 **Learn More**: [AI Analysis](#-ai-analysis) — Unlock hidden capabilities and make trend tracking more efficient!
10771113

10781114

1115+
<a name="configuration-guide"></a>
1116+
10791117
## ⚙️ Configuration Guide
10801118

10811119
> **📖 Reminder**: This chapter provides detailed configuration explanations. Suggest completing [Quick Start](#-quick-start) basic configuration first, then refer to detailed options here as needed.
@@ -1106,21 +1144,22 @@ If you don't know how to look, you can directly copy the partially organized [Pl
11061144

11071145
### 2. Keyword Configuration
11081146

1109-
<details id="frequencywordstxt-configuration-tutorial">
1110-
<summary>👉 Click to expand: <strong>frequency_words.txt Configuration Tutorial</strong></summary>
1111-
<br>
1112-
1113-
Configure monitoring keywords in `frequency_words.txt` with three syntax types and grouping features.
1114-
1115-
Keywords at the top have higher priority. Adjust keyword order based on your interests.
1147+
Configure monitoring keywords in `frequency_words.txt` with four syntax types and grouping features.
11161148

11171149
| Syntax Type | Symbol | Purpose | Example | Matching Logic |
11181150
|------------|--------|---------|---------|----------------|
11191151
| **Normal** | None | Basic matching | `Huawei` | Match any one |
11201152
| **Required** | `+` | Scope limiting | `+phone` | Must include both |
11211153
| **Filter** | `!` | Noise exclusion | `!ad` | Exclude if included |
1154+
| **Count Limit** | `@` | Control display count | `@10` | Max 10 news (v3.2.0 new) |
1155+
1156+
#### 2.1 Basic Syntax
11221157

1123-
#### 📋 Basic Syntax
1158+
<a name="keyword-basic-syntax"></a>
1159+
1160+
<details>
1161+
<summary>👉 Click to expand: <strong>Basic Syntax Tutorial</strong></summary>
1162+
<br>
11241163

11251164
##### 1. **Normal Keywords** - Basic Matching
11261165
```txt
@@ -1147,6 +1186,18 @@ Huawei
11471186
```
11481187
**Effect:** News containing filter words will be **excluded**, even if it contains keywords
11491188

1189+
##### 4. **Count Limit** `@number` - Control Display Count (v3.2.0 new)
1190+
```txt
1191+
Tesla
1192+
Musk
1193+
@5
1194+
```
1195+
**Effect:** Limit maximum news count for this keyword group
1196+
1197+
**Priority:** `@number` > Global config > Unlimited
1198+
1199+
---
1200+
11501201
#### 🔗 Group Feature - Importance of Empty Lines
11511202

11521203
**Core Rule:** Use **empty lines** to separate different groups, each group is independently counted
@@ -1264,6 +1315,69 @@ sales
12641315

12651316
</details>
12661317

1318+
#### 2.2 Advanced Settings (v3.2.0 new)
1319+
1320+
<a name="keyword-advanced-settings"></a>
1321+
1322+
<details>
1323+
<summary>👉 Click to expand: <strong>Advanced Settings Tutorial</strong></summary>
1324+
<br>
1325+
1326+
##### Keyword Sorting Priority
1327+
1328+
**Config Location:** `config/config.yaml`
1329+
1330+
```yaml
1331+
report:
1332+
sort_by_position_first: false # Sorting priority config
1333+
```
1334+
1335+
| Value | Sorting Rule | Use Case |
1336+
|-------|-------------|----------|
1337+
| `false` (default) | News count ↓ → Config position ↑ | Focus on popularity trends |
1338+
| `true` | Config position ↑ → News count ↓ | Focus on personal priority |
1339+
1340+
**Example:** Config order A, B, C, news count A(3), B(10), C(5)
1341+
- `false`: B(10) → C(5) → A(3)
1342+
- `true`: A(3) → B(10) → C(5)
1343+
1344+
##### Global Display Count Limit
1345+
1346+
```yaml
1347+
report:
1348+
max_news_per_keyword: 10 # Max 10 per keyword (0=unlimited)
1349+
```
1350+
1351+
**Docker Environment Variables:**
1352+
```bash
1353+
SORT_BY_POSITION_FIRST=true
1354+
MAX_NEWS_PER_KEYWORD=10
1355+
```
1356+
1357+
**Combined Example:**
1358+
```yaml
1359+
# config.yaml
1360+
report:
1361+
sort_by_position_first: true # Config order priority
1362+
max_news_per_keyword: 10 # Global default max 10 per keyword
1363+
```
1364+
1365+
```txt
1366+
# frequency_words.txt
1367+
Tesla
1368+
Musk
1369+
@20 # Key focus, show 20 (override global)
1370+
1371+
Huawei # Use global config, show 10
1372+
1373+
BYD
1374+
@5 # Limit to 5
1375+
```
1376+
1377+
**Final Effect:** Display in config order: Tesla(20) → Huawei(10) → BYD(5)
1378+
1379+
</details>
1380+
12671381
### 3. Push Mode Details
12681382

12691383
<details>

0 commit comments

Comments
 (0)