更新文档

This commit is contained in:
johlanse 2022-08-04 11:01:18 +08:00
parent 812b8ce8e3
commit 7352c847b8
6 changed files with 34 additions and 14 deletions

View File

@ -36,11 +36,12 @@ type Config struct {
QQ struct { QQ struct {
} }
Web struct { Web struct {
Enable bool `json:"enable" yaml:"enable"` Enable bool `json:"enable" yaml:"enable"`
Account string `json:"account" yaml:"account"` Account string `json:"account" yaml:"account"`
Password string `json:"password" yaml:"password"` Password string `json:"password" yaml:"password"`
Host string `json:"host" yaml:"host"` Host string `json:"host" yaml:"host"`
Port int `json:"port" yaml:"port"` Port int `json:"port" yaml:"port"`
Announcement string `json:"announcement" yaml:"announcement"`
} `json:"web"` } `json:"web"`
Cron string `json:"cron" yaml:"cron"` Cron string `json:"cron" yaml:"cron"`
EdgePath string `json:"edge_path" yaml:"edge_path"` EdgePath string `json:"edge_path" yaml:"edge_path"`

View File

@ -1,4 +1,7 @@
## 配置文件<!-- {docsify-ignore} --> ## 配置文件<!-- {docsify-ignore} -->
> 配置文件修改后需要重启程序才能生效
```yaml ```yaml
# 刷课模式默认为3 # 刷课模式默认为3
# 1只刷文章何视频 # 1只刷文章何视频

View File

@ -3,7 +3,7 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Docsify-Guide</title> <title>Study_xxqg</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="Description"> <meta name="description" content="Description">
<meta name="viewport" <meta name="viewport"

View File

@ -11,8 +11,14 @@
## docker运行 ## docker运行
``` ```
docker run --name study_xxqg -d -p 8080:8080 -v /etc/study_xxqg/:/opt/config/ jolanse/study_xxqg docker run --name study_xxqg -d -p 8080:8080 -v /etc/study_xxqg/:/opt/config/ jolanse/study_xxqg:latest
``` ```
各个参数的含义:
+ **--name study_xxqg** 运行的容器的名称,可以根据自己实际情况进行修改
+ **-p 8080:8080** 将容器内部的8080端口映射到容器外面前面是宿主机的端口就是网页上访问的端口后面是容器内部需要运行的端口对应配置文件内web配置的端口就好
+ **-v /etc/study_xxqg/:/opt/config/** 将容器内的/opt/config/目录映射到宿主机的/etc/study_xxqg/目录可根据实际情况修改前面宿主机路径映射后对应的config.yml配置文件位置就在该目录下
+ **jolanse/study_xxqg:latest**镜像名称和镜像的版本latest代表开发中的最新版本
## docker-compose运行 ## docker-compose运行

View File

@ -87,8 +87,9 @@ study_xxqg进程会在运行的时候将pid输出到目录下的pid.pid文件
使用docker可以快速解决 使用docker可以快速解决
[//]: # (```)
[//]: # (sudo apt-get install -y libx11-xcb1 && apt-get install -y libgtk-3-0 && apt-get install -y libxt6 && apt-get install -y libdbus-glib-1.2) + ### 为什么运行了就卡住了
[//]: # (```) 当开启了cron定时配置微信公众号测试号配置telegram配置这三项的任意一项后
程序就会等待用户的指令从而卡住,所以只需要修改配置文件就可以解决

View File

@ -37,10 +37,12 @@ wechat:
``` ```
+ 前往微信[公众号开发者平台](http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login),手机微信扫码登录 + 前往微信[公众号开发者平台](http://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login),手机微信扫码登录
+ 配置url为**http:ip:port/wx**,ip和端口在web项配置中配置 + 配置url为**http://ip:port/wx**,ip为你运行机器的公网ip,若使用docker运行端口则为宿主机中映射出来的端口ip和端口的配置和web使用同一个配置
+ 设置token + 设置token,需和配置项中一样
+ 分别添加登录模板消息和普通模板消息,添加要求查看配置项注释 + 分别添加登录模板消息和普通模板消息,添加要求:![](./img/wx_temp.jpg)
+ 在配置文件中配置所有内容,启动程序 + 在配置文件中配置所有内容,启动程序
+ 运行程序后在浏览器中访问配置的url,页面会返回``No Signature!``,然后提交配置,若成功则关注公众号尝试运行
+ docker运行方式参考[linux运行](./linux/index.md)
### web推送 ### web推送
> 适用于部署在服务器上或者家里有公网IP的设备上 > 适用于部署在服务器上或者家里有公网IP的设备上
@ -60,7 +62,9 @@ web:
password: admin password: admin
``` ```
开启后通过浏览器访问 *http://ip:port*即可打开网址 + 开启后通过浏览器访问 *http://ip:port*即可打开网址 ,若为docker运行则ip为宿主机公网ip,端口为docker映射到宿主机的端口
+ 若无法访问首先检查程序运行日志查看有无报错其次查看docker的运行情况端口是否映射正常然后可以通过curl命令检测在宿主机中能否访问然后检查防火墙之类的
+ 若点击登录之后出现一个小框然后无反应,则说明账户密码错误,请重新配置程序账户密码并重启程序
### 钉钉推送 ### 钉钉推送
配置config.yml的如下部分,具体使用教程详情参考[钉钉](https://developers.dingtalk.com/document/robots/custom-robot-access?spm=ding_open_doc.document.0.0.7f875e5903iVpC#topic-2026027) 配置config.yml的如下部分,具体使用教程详情参考[钉钉](https://developers.dingtalk.com/document/robots/custom-robot-access?spm=ding_open_doc.document.0.0.7f875e5903iVpC#topic-2026027)
@ -70,6 +74,11 @@ ding:
access_token: "" access_token: ""
secret: "" secret: ""
``` ```
+ 在电脑端钉钉中创建群聊在聊天设置中选择只能群助手选择添加机器人机器人类别选择webhook自定义机器人
+ 机器人名字任意机器人安全设置勾选加签复制加签的密钥作为secret配置项填入配置文件中
+ 勾选协议确认添加会出现一个webhook地址形如这样```https://oapi.dingtalk.com/robot/send?access_token=aaabbbbcccc```
+ 将上述地址中的后半段就是access_token=之后的内容作为access_token配置项填入配置文件中例如上述网址则填入aaabbbccc到access_token中
+ 设置定时cron,启动程序,程序会在定时时间运行脚本
### pushplus推送 ### pushplus推送
配置config.yml的如下部分具体使用教程参考[pushplus](https://www.pushplus.plus/) 配置config.yml的如下部分具体使用教程参考[pushplus](https://www.pushplus.plus/)