Skip to content

Commit

Permalink
docs: 更新文档
Browse files Browse the repository at this point in the history
  • Loading branch information
Cassius0924 committed Feb 20, 2024
1 parent 34c487d commit be6a49a
Show file tree
Hide file tree
Showing 29 changed files with 166 additions and 22 deletions.
49 changes: 33 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# WeChatter
<h1>
<b>WeChatter: </b>
<span style="font-family: 'Times New Roman',serif;">
Make
<b>WeChat</b>
Bet<b>ter</b>
</span>
</h1>


<div align="center">

[![CI/CD](https://github.com/Cassius0924/WeChatter/actions/workflows/test.yml/badge.svg)](https://github.com/Cassius0924/WeChatter/actions/workflows/test.yml)
[![GitHub Release](https://img.shields.io/github/v/release/Cassius0924/WeChatter)](https://github.com/Cassius0924/WeChatter/releases)
[![GitHub License](https://img.shields.io/github/license/Cassius0924/WeChatter)](https://github.com/Cassius0924/WeChatter/blob/master/LICENSE)
![Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)

</div>

## 介绍

基于 [wechatbot-webhook](https://github.com/danni-cool/wechatbot-webhook) 的微信机器人💬,支持 GPT 问答、热搜、天气预报、消息转发、Webhook提醒等功能。

[![wechatter show](docs/images/wechatter_show.png)](docs/command_show.md)

## 快速开始

### 运行 wechatbot-webhook
Expand Down Expand Up @@ -82,24 +93,24 @@ python3 main.py
## 支持的命令

- [x] GPT 问答,基于 [Copilot-GPT4-Server](https://github.com/aaamoon/copilot-gpt4-service)
- [x] 获取 Bilibili 热搜
- [x] 获取知乎热搜
- [x] 获取微博热搜
- [x] 获取抖音热搜
- [x] 获取 GitHub 趋势
- [x] 单词/词语翻译
- [x] 获取少数派早报
- [x] 获取历史上的今天
- [x] 二维码生成器
- [x] Bilibili 热搜
- [x] 知乎热搜
- [x] 微博热搜
- [x] 抖音热搜
- [x] GitHub 趋势
- [x] 单词词语翻译
- [x] 少数派早报
- [x] 历史上的今天
- [x] 二维码生成
- [x] 待办清单(TODO)
- [x] 获取人民日报PDF
- [x] 获取天气预报
- [x] 获取食物热量/卡路里
- [x] 随机获取冷知识
- [x] 获取中石化92号汽油指导价
- [x] 人民日报PDF
- [x] 天气预报
- [x] 食物热量
- [x] 冷知识
- [x] 中石化92号汽油指导价

> [!TIP]
> 更多命令使用 `/help` 命令查看
> 命令帮助请使用 `/help` 命令查询或查看[命令功能展示](docs/command_show.md)
## 支持的功能

Expand Down Expand Up @@ -193,6 +204,12 @@ python3 main.py

关于命令名称可选值详见[自定义命令关键词配置详细](docs/custom_command_key_config_detail.md)

# 贡献者

Thanks to the following people who have contributed to this project:

[![Contributors](https://contrib.rocks/image?repo=Cassius0924/WeChatter)](https://github.com/Cassius0924/WeChatter/graphs/contributors)

## 插件化

> [!NOTE]
Expand Down
127 changes: 127 additions & 0 deletions docs/command_show.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# 命令功能展示

本文档展示了 WeChatter 支持的命令功能。

## 目录
- [天气预报](#天气预报)
- [待办清单](#待办清单)
- [添加待办](#添加待办)
- [删除待办](#删除待办)
- [查看待办](#查看待办)
- [Bilibili 热搜](#Bilibili-热搜)
- [知乎热搜](#知乎热搜)
- [微博热搜](#微博热搜)
- [抖音热搜](#抖音热搜)
- [GitHub 趋势](#GitHub-趋势)
- [GPT 问答](#GPT-问答)
- [持续对话](#持续对话)
- [新建对话](#新建对话)
- [所有对话](#所有对话)
- [继续对话](#继续对话)
- [对话记录](#对话记录)
- [单词词语翻译](#单词词语翻译)
- [少数派早报](#少数派早报)
- [人民日报](#人民日报)
- [二维码生成](#二维码生成)
- [食物热量](#食物热量)
- [中石化92号汽油指导价](#中石化92号汽油指导价)
- [冷知识](#冷知识)
- [历史上的今天](#历史上的今天)

## 天气预报

![获取天气预报](./images/cmd_weather.png)

## 待办清单

### 添加待办

![待办清单](./images/cmd_todo_1.png)

### 删除待办

![待办清单](./images/cmd_todo_2.png)

### 查看待办

![待办清单](./images/cmd_todo_3.png)

## Bilibili 热搜

![获取 Bilibili 热搜](./images/cmd_bili_hot.png)

## 知乎热搜

![获取知乎热搜](./images/cmd_zhihu_hot.png)

## 微博热搜

![获取微博热搜](./images/cmd_weibo_hot.png)

## 抖音热搜

![获取抖音热搜](./images/cmd_douyin_hot.png)

## GitHub 趋势

![获取 GitHub 趋势](./images/cmd_github_trending.png)

## GPT 问答

### 持续对话

![GPT 问答](./images/cmd_gpt4_1.png)

### 新建对话

![GPT 问答](./images/cmd_gpt4_2.png)

### 所有对话

![GPT 问答](./images/cmd_gpt4_3.png)

### 继续对话

![GPT 问答](./images/cmd_gpt4_4.png)

### 对话记录

![GPT 问答](./images/cmd_gpt4_5.png)

## 单词词语翻译

![单词词语翻译](./images/cmd_word.png)

## 少数派早报

![少数派早报](./images/cmd_pai_post.png)

## 人民日报

### PDF 文件

![人民日报](./images/cmd_people_daily_1.png)

### 日报链接

![人民日报](./images/cmd_people_daily_2.png)

## 二维码生成

![二维码生成](./images/cmd_qrcode.png)

## 食物热量

![食物热量](./images/cmd_food_calories.png)

## 中石化92号汽油指导价

![中石化92号汽油指导价](./images/cmd_gasoline_price.png)

## 冷知识

![冷知识](./images/cmd_trivia.png)

## 历史上的今天

![历史上的今天](./images/cmd_today_in_history.png)
Binary file added docs/images/cmd_bili_hot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_douyin_hot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_food_calories.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_gasoline_price.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_github_trending.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_gpt4_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_gpt4_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_gpt4_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_gpt4_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_gpt4_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_pai_post.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_people_daily_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_people_daily_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_qrcode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_today_in_history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_todo_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_todo_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_todo_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_trivia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_weather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_weibo_hot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_word.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/cmd_zhihu_hot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wechatter_show.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/wechatter_show2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions tests/commands/test_github_trending/test_github_trending.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def test_parse_github_trending_response_failure(self):

def test_generate_github_trending_message_success(self):
result = gt._generate_github_trending_message(self.gt_list)
true_result = "1. 🏎️ danielmiessler / fabric\n⭐ 2,538 total (⭐1,139 today)\n🔤 Python\n📖 fabric is an open-source framework for augmenting humans using AI.\n2. 🏎️ InkboxSoftware / excelCPU\n⭐ 2,507 total (⭐337 today)\n🔤 Python\n📖 16-bit CPU for Excel, and related files\n3. 🏎️ f / awesome-chatgpt-prompts\n⭐ 98,933 total (⭐115 today)\n🔤 HTML\n📖 This repo includes ChatGPT prompt curation to use ChatGPT better.\n4. 🏎️ all-in-aigc / aicover\n⭐ 973 total (⭐205 today)\n🔤 TypeScript\n📖 ai cover generator\n5. 🏎️ facebookresearch / codellama\n⭐ 12,972 total (⭐197 today)\n🔤 Python\n📖 Inference code for CodeLlama models\n6. 🏎️ webprodigies / plura-production\n⭐ 315 total (⭐43 today)\n🔤 TypeScript\n📖 No description.\n7. 🏎️ ExOK / Celeste64\n⭐ 895 total (⭐170 today)\n🔤 C#\n📖 A game made by the Celeste developers in a week(ish, closer to 2)\n8. 🏎️ haotian-liu / LLaVA\n⭐ 13,169 total (⭐155 today)\n🔤 Python\n📖 [NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.\n9. 🏎️ mlflow / mlflow\n⭐ 16,583 total (⭐127 today)\n🔤 Python\n📖 Open source platform for the machine learning lifecycle\n10. 🏎️ PKU-YuanGroup / MoE-LLaVA\n⭐ 689 total (⭐219 today)\n🔤 Python\n📖 Mixture-of-Experts for Large Vision-Language Models"
self.assertIn(true_result, result)
true_result = "✨=====GitHub Trending=====✨\n1.📦 danielmiessler / fabric\n ⭐ 2,538 total (⭐1,139 today)\n 🔤 Python\n 📖 fabric is an open-source framework for augmenting humans using AI.\n2.📦 InkboxSoftware / excelCPU\n ⭐ 2,507 total (⭐337 today)\n 🔤 Python\n 📖 16-bit CPU for Excel, and related files\n3.📦 f / awesome-chatgpt-prompts\n ⭐ 98,933 total (⭐115 today)\n 🔤 HTML\n 📖 This repo includes ChatGPT prompt curation to use ChatGPT better.\n4.📦 all-in-aigc / aicover\n ⭐ 973 total (⭐205 today)\n 🔤 TypeScript\n 📖 ai cover generator\n5.📦 facebookresearch / codellama\n ⭐ 12,972 total (⭐197 today)\n 🔤 Python\n 📖 Inference code for CodeLlama models\n6.📦 webprodigies / plura-production\n ⭐ 315 total (⭐43 today)\n 🔤 TypeScript\n 📖 No description.\n7.📦 ExOK / Celeste64\n ⭐ 895 total (⭐170 today)\n 🔤 C#\n 📖 A game made by the Celeste developers in a week(ish, closer to 2)\n8.📦 haotian-liu / LLaVA\n ⭐ 13,169 total (⭐155 today)\n 🔤 Python\n 📖 [NeurIPS'23 Oral] Visual Instruction Tuning (LLaVA) built towards GPT-4V level capabilities and beyond.\n9.📦 mlflow / mlflow\n ⭐ 16,583 total (⭐127 today)\n 🔤 Python\n 📖 Open source platform for the machine learning lifecycle\n10.📦 PKU-YuanGroup / MoE-LLaVA\n ⭐ 689 total (⭐219 today)\n 🔤 Python\n 📖 Mixture-of-Experts for Large Vision-Language Models\n"
self.assertEqual(result, true_result)

def test_generate_zhihu_hot_message_empty_list(self):
result = gt._generate_github_trending_message([])
Expand Down
8 changes: 4 additions & 4 deletions wechatter/commands/_commands/github_trending.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ def _generate_github_trending_message(gt_list: List) -> str:
gt_str = "✨=====GitHub Trending=====✨\n"
for i, trending in enumerate(gt_list[:10]): # 只获取前10个趋势
gt_str += (
f"{i + 1}. 🏎️ {trending['author']} / {trending['repo']}\n"
f" {trending['star_total']} total (⭐{trending['star_today']})\n"
f"🔤 {trending['programmingLanguage']}\n"
f"📖 {trending['comment']}\n"
f"{i + 1}.📦 {trending['author']} / {trending['repo']}\n"
f" {trending['star_total']} total (⭐{trending['star_today']})\n"
f" 🔤 {trending['programmingLanguage']}\n"
f" 📖 {trending['comment']}\n"
)

return gt_str
Expand Down

0 comments on commit be6a49a

Please sign in to comment.