Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/han-ya-jun/news_watch_notice
gocn每日新闻和go语言中文网(每日资讯)和gopher daily自动推送
https://github.com/han-ya-jun/news_watch_notice
gocn gocnpush
Last synced: 2 months ago
JSON representation
gocn每日新闻和go语言中文网(每日资讯)和gopher daily自动推送
- Host: GitHub
- URL: https://github.com/han-ya-jun/news_watch_notice
- Owner: Han-Ya-Jun
- Created: 2019-05-05T16:12:50.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-07T01:04:07.000Z (almost 2 years ago)
- Last Synced: 2024-06-20T08:01:09.291Z (7 months ago)
- Topics: gocn, gocnpush
- Language: Go
- Homepage:
- Size: 8.73 MB
- Stars: 27
- Watchers: 3
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
#### 爬取[GoCn每日新闻](https://gocn.vip/topics/node18)和[go语言中文网(每日资讯)](https://studygolang.com/go/godaily)和[Gopher Daily](https://gopher-daily.com/)并推送到微信/邮箱/slack
![image](http://cdn.hanyajun.com/news_watch.png)![2019-11-20-18-21-29](http://cdn.hanyajun.com/2019-11-20-18-21-29.png)
#### 使用方法
##### 通过微信通知```
docker run -v /etc/localtime:/etc/localtime:ro \
-e NOTICE_WECHAT_USERS=特鲁尼克 hanyajun/news_watch_notice
```
- NOTICE_WECHAT_USERS 代表你要通知的好友的昵称,其中自己微信的文件助手是默认会发的,如果有多个好友,以逗号","隔开。
![image](http://cdn.hanyajun.com/news_notice_wechat.png)
###### 效果
![image](http://cdn.hanyajun.com/20190530_233034_wechat8.png)**微信通知有个缺点,就是网页版微信只能有一个终端登录**
##### 通过微信公众平台(测试号)推送
访问 https://mp.weixin.qq.com/debug/cgi-bin/sandbox?t=sandbox/login
微信扫一扫开通并关注测试号,填写 appid 和 appsecret 运行即可在订阅号中找到该测试号推送的消息```bash
docker run -d -v /etc/localtime:/etc/localtime:ro \
-e NOTICE_TYPE=disable \
-e WECHAT_PUSH=push \
-e WECHAT_APP_ID=wxf123456789 \
-e WECHAT_APP_SECRET=adcdefg123456789 \
hanyajun/news_watch_notice
```##### 通过邮箱推送
```
docker run -v /etc/localtime:/etc/localtime:ro -e NOTICE_TYPE=mail \ //采用邮箱通知,不填则默认微信
-e [email protected],[email protected] \ //发送
-e NOTICE_MAIL_PWD=******* \ //邮箱smtp授权密码
-e NOTICE_MAIL_PORT=25 \ //smtp端口
-e NOTICE_MAIL_HOST=smtp.qq.com \ //smtp服务器地址
-e [email protected] \ //发送邮箱
-e [email protected],[email protected] //发送抄送 hanyajun/news_watch_notice
```
###### 效果
![image](http://cdn.hanyajun.com/wechat4.png)![2019-11-20-18-26-23](http://cdn.hanyajun.com/2019-11-20-18-26-23.png)
##### slack webhook 发送
```json
docker run -d --name gocn-news-notice-slack -v /etc/localtime:/etc/localtime:ro \
-e NOTICE_TYPE=slack \ //采用slack webhook发送
-e NOTICE_SLACK_WEB_HOOK_URL=************** //自己创建的slack app的webhook的url
hanyajun/news_watch_notice```
###### 效果![image](http://cdn.hanyajun.com/20190604_011032_slack_send.png)
![2019-11-20-18-18-48](http://cdn.hanyajun.com/2019-11-20-18-18-48.png)