mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
📃 docs: 更新README,文档更加清楚!
This commit is contained in:
parent
7929b72a0a
commit
96c7ea3fe7
34
README.md
34
README.md
@ -24,20 +24,44 @@ test -- 爬虫文件[python]
|
||||
index -- 主入口
|
||||
|
||||
## 📔使用说明
|
||||
1. 下载mongodb(可能会耗费一些时间:影响功能【#沃日吗】)
|
||||
1. 【可选】下载mongodb(可能会耗费一些时间:影响功能【#沃日吗】)
|
||||
> linux系统下自己装一个mongodb,上一个密码(不上有风险)
|
||||
2. `test -- main.py`爬取链接(要有python环境、配合mongodb使用)
|
||||
2. 【可选】`test -- main.py`爬取链接(要有python环境、配合mongodb使用)
|
||||
> python3 main.py
|
||||
4. 在`Yunzai-Bot`安装mongodb、axios(0.27.2)、代理工具(tunnel)、TwitterAPI依赖
|
||||
3. 【必要】在`Yunzai-Bot`安装mongodb、axios(0.27.2)、代理工具(tunnel)、TwitterAPI依赖
|
||||
> pnpm add mongodb axios tunnel twitter-api-v2 -w
|
||||
|
||||
4. 下载插件
|
||||
4. 【必要】下载插件
|
||||
> git clone https://gitee.com/kyrzy0416/rconsole-plugin.git ./plugins/rconsole-plugin/
|
||||
|
||||
> 注:可以不用mongodb这些操作,只是用不了一些命令而已
|
||||
5. 要使用视频解析功能要下载插件【推荐ubuntu系统】
|
||||
5. 【可选】要使用视频解析功能要下载插件【推荐ubuntu系统】
|
||||
> sudo apt-get install ffmpeg
|
||||
|
||||
【必要】备注:如果启动不起来删除mongodb的代码即可:
|
||||
```javascript
|
||||
// in apps/mystery.js
|
||||
|
||||
// Mongodb初始化
|
||||
function initMongo () {
|
||||
const MongoClient = mongodb.MongoClient
|
||||
const url = 'mongodb://localhost:27017/'
|
||||
return new Promise((resolve, reject) => {
|
||||
MongoClient.connect(url, (err, db) => {
|
||||
const dbo = db.db('test')
|
||||
if (err) {
|
||||
throw err // 和调用 reject(err) 效果类似
|
||||
}
|
||||
let collection = dbo.collection('temp')
|
||||
resolve(collection)
|
||||
})
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
【必要】相关配置(apps/tools.js):
|
||||
> twiiter-api:https://developer.twitter.com/en
|
||||
> 百度翻译api:https://fanyi-api.baidu.com/doc/21
|
||||
## 📦业务
|
||||

|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user