Forráskód Böngészése

修复 README.md 中的配置错误

sansan 4 hónapja
szülő
commit
f96a6edc9b
2 módosított fájl, 74 hozzáadás és 37 törlés
  1. 35 22
      README-EN.md
  2. 39 15
      README.md

+ 35 - 22
README-EN.md

@@ -1856,13 +1856,15 @@ For specific additions, visit [project source code](https://github.com/ourongxin
 
 ```yaml
 platforms:
-  - id: "toutiao"
-    name: "Toutiao"
-  - id: "baidu"
-    name: "Baidu Hot Search"
-  - id: "wallstreetcn-hot"
-    name: "Wallstreetcn"
-  # Add more platforms...
+  enabled: true                       # Enable trending platform crawling
+  sources:
+    - id: "toutiao"
+      name: "Toutiao"
+    - id: "baidu"
+      name: "Baidu Hot Search"
+    - id: "wallstreetcn-hot"
+      name: "Wallstreetcn"
+    # Add more platforms...
 ```
 
 > 💡 **Shortcut**: If you don't know how to read source code, you can copy from others' organized [Platform Configuration Summary](https://github.com/sansan0/TrendRadar/issues/95)
@@ -2838,7 +2840,7 @@ After MCP service starts, configure based on your client:
 <summary>👉 Click to expand: <strong>Customize Push Style and Content</strong></summary>
 <br>
 
-**Configuration Location:** `report` section in `config/config.yaml`
+**Configuration Location:** `report` and `display` sections in `config/config.yaml`
 
 ```yaml
 report:
@@ -2847,7 +2849,14 @@ report:
   rank_threshold: 5                # Ranking highlight threshold
   sort_by_position_first: false    # Sorting priority
   max_news_per_keyword: 0          # Maximum display count per keyword
-  reverse_content_order: false     # Content order configuration
+
+display:
+  region_order:                    # Region display order (v5.2.0 new)
+    - new_items                    # New trending section
+    - hotlist                      # Hotlist section
+    - rss                          # RSS subscription section
+    - standalone                   # Independent display section
+    - ai_analysis                  # AI analysis section
 ```
 
 #### Configuration Details
@@ -2859,7 +2868,7 @@ report:
 | `rank_threshold` | int | `5` | Ranking highlight threshold, news with rank ≤ this value will be displayed in bold |
 | `sort_by_position_first` | bool | `false` | Sorting priority: `false`=sort by news count, `true`=sort by config position |
 | `max_news_per_keyword` | int | `0` | Maximum display count per keyword, `0`=unlimited |
-| `reverse_content_order` | bool | `false` | Content order: `false`=trending keywords stats first, `true`=new trending news first |
+| `display.region_order` | list | See config above | Adjust list order to control region display positions |
 
 #### Display Mode Configuration (v4.6.0 New)
 
@@ -2886,24 +2895,28 @@ Controls how news is grouped in push messages and HTML reports:
   2. [Trump] Trump announces major policy #2 - 09:15 (3 times)
 ```
 
-#### Content Order Configuration (v3.5.0 New)
+#### Region Display Order (region_order)
 
-Controls display order of two content sections in push messages and HTML reports:
+Control the display position of each section in push messages by adjusting the order of `display.region_order` list.
 
-| Config Value | Display Order |
-|-------------|--------------|
-| `false` (default) | ① Trending Keywords Stats → ② New Trending News |
-| `true` | ① New Trending News → ② Trending Keywords Stats |
+**Default Order**: New Items → Hotlist → RSS → Standalone → AI Analysis
 
-**Use Cases:**
-- `false` (default): Suitable for users focusing on keyword match results, view categorized stats first
-- `true`: Suitable for users focusing on latest updates, prioritize viewing new trending topics
+**Custom Example**: Want AI analysis at the top?
 
-**Docker Environment Variable:**
-```bash
-REVERSE_CONTENT_ORDER=true
+```yaml
+display:
+  region_order:
+    - ai_analysis                  # Move to first line
+    - new_items
+    - hotlist
+    - rss
+    - standalone
 ```
 
+**Note**: A region will only be displayed when both conditions are met:
+1. Listed in `region_order`
+2. Corresponding switch in `display.regions` is `true`
+
 #### Sorting Priority Configuration
 
 **Example Scenario:** Config order A, B, C, news count A(3), B(10), C(5)

+ 39 - 15
README.md

@@ -1909,13 +1909,15 @@ ai_translation:
 
 ```yaml
 platforms:
-  - id: "toutiao"
-    name: "今日头条"
-  - id: "baidu"
-    name: "百度热搜"
-  - id: "wallstreetcn-hot"
-    name: "华尔街见闻"
-  # 添加更多平台...
+  enabled: true                       # 是否启用热榜平台抓取
+  sources:
+    - id: "toutiao"
+      name: "今日头条"
+    - id: "baidu"
+      name: "百度热搜"
+    - id: "wallstreetcn-hot"
+      name: "华尔街见闻"
+    # 添加更多平台...
 ```
 
 > 💡 **快捷方式**:如果不会看源代码,可以复制他人整理好的 [平台配置汇总](https://github.com/sansan0/TrendRadar/issues/95)
@@ -2877,7 +2879,7 @@ MCP 服务启动后,根据不同客户端进行配置:
 <summary>👉 点击展开:<strong>自定义推送样式和内容</strong></summary>
 <br>
 
-**配置位置:** `config/config.yaml` 的 `report` 部分
+**配置位置:** `config/config.yaml` 的 `report` 和 `display` 部分
 
 ```yaml
 report:
@@ -2886,7 +2888,14 @@ report:
   rank_threshold: 5                # 排名高亮阈值
   sort_by_position_first: false    # 排序优先级
   max_news_per_keyword: 0          # 每个关键词最大显示数量
-  reverse_content_order: false     # 内容顺序配置
+
+display:
+  region_order:                    # 区域显示顺序(v5.2.0 新增)
+    - new_items                    # 新增热点区域
+    - hotlist                      # 热榜区域
+    - rss                          # RSS 订阅区域
+    - standalone                   # 独立展示区
+    - ai_analysis                  # AI 分析区域
 ```
 
 #### 常用配置项说明
@@ -2898,7 +2907,7 @@ report:
 | **高亮重点** | `rank_threshold` | `5` | 排名在前 5 的新闻会**加粗**显示,一眼看到最火的 |
 | **排序规则** | `sort_by_position_first` | `false` | `false`=热度高的排前面,`true`=你配置的词排前面 |
 | **数量限制** | `max_news_per_keyword` | `0` | 每个关键词最多看几条?`0`表示不限制 |
-| **显示顺序** | `reverse_content_order` | `false` | `false`=先看统计,`true`=先看新增新闻 |
+| **显示顺序** | `display.region_order` | 见上方配置 | 调整列表顺序即可控制各区域的显示位置 |
 
 #### 分组方式对比(display_mode)
 
@@ -2909,12 +2918,27 @@ report:
 | `keyword`(默认) | **按关键词聚合** | `[平台名]` | 我关注"AI",想看各平台关于AI的新闻 |
 | `platform` | **按平台聚合** | `[关键词]` | 我关注"微博",想看微博上关于我关注词的新闻 |
 
-#### 内容显示顺序(reverse_content_order)
+#### 区域显示顺序(region_order)
 
-| 配置值 | 显示顺序 | 适用场景 |
-|-------|---------|---------|
-| `false`(默认) | ① 📊 热点统计 (聚合) → ② 🆕 新增新闻 (流水) | **推荐**:先看整体热度,再看具体新增 |
-| `true` | ① 🆕 新增新闻 (流水) → ② 📊 热点统计 (聚合) | **追新党**:只想第一时间看到新出了什么 |
+通过调整 `display.region_order` 列表的顺序,可以控制推送消息中各区域的显示位置。
+
+**默认顺序**:新增热点 → 热榜 → RSS → 独立展示区 → AI 分析
+
+**自定义示例**:想让 AI 分析放在最前面?
+
+```yaml
+display:
+  region_order:
+    - ai_analysis                  # 移到第一行
+    - new_items
+    - hotlist
+    - rss
+    - standalone
+```
+
+**注意**:区域需同时满足两个条件才会显示:
+1. 在 `region_order` 列表中
+2. 在 `display.regions` 中对应开关为 `true`
 
 #### 排序优先级(sort_by_position_first)