✨ 新增发送词云图片(需配合外部工具预先生成词云图片)
All checks were successful
BuildImage / build-image (push) Successful in 1m15s
All checks were successful
BuildImage / build-image (push) Successful in 1m15s
This commit is contained in:
parent
86435e9707
commit
997ad806f0
@ -8,13 +8,20 @@ import (
|
|||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// month
|
// month
|
||||||
// @description: 月排行榜
|
// @description: 月排行榜
|
||||||
func month() {
|
func month() {
|
||||||
for _, id := range config.Conf.Task.WaterGroup.Groups {
|
for _, id := range config.Conf.Task.WaterGroup.Groups {
|
||||||
|
// 消息统计
|
||||||
dealMonth(id)
|
dealMonth(id)
|
||||||
|
// 获取上个月月份
|
||||||
|
yd := time.Now().Local().AddDate(0, 0, -1).Format("200601")
|
||||||
|
// 发送词云
|
||||||
|
fileName := fmt.Sprintf("%s_%s.png", yd, id)
|
||||||
|
utils.SendImage(id, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ import (
|
|||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 水群排行榜
|
// 水群排行榜
|
||||||
@ -16,7 +17,13 @@ import (
|
|||||||
// @description: 昨日排行榜
|
// @description: 昨日排行榜
|
||||||
func yesterday() {
|
func yesterday() {
|
||||||
for _, id := range config.Conf.Task.WaterGroup.Groups {
|
for _, id := range config.Conf.Task.WaterGroup.Groups {
|
||||||
|
// 消息统计
|
||||||
dealYesterday(id)
|
dealYesterday(id)
|
||||||
|
// 获取昨日日期
|
||||||
|
yd := time.Now().Local().AddDate(0, 0, -1).Format("20060102")
|
||||||
|
// 发送词云
|
||||||
|
fileName := fmt.Sprintf("%s_%s.png", yd, id)
|
||||||
|
utils.SendImage(id, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,13 +8,20 @@ import (
|
|||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// week
|
// week
|
||||||
// @description: 周排行榜
|
// @description: 周排行榜
|
||||||
func week() {
|
func week() {
|
||||||
for _, id := range config.Conf.Task.WaterGroup.Groups {
|
for _, id := range config.Conf.Task.WaterGroup.Groups {
|
||||||
|
// 消息统计
|
||||||
dealWeek(id)
|
dealWeek(id)
|
||||||
|
// 获取上周周数
|
||||||
|
year, weekNo := time.Now().Local().AddDate(0, 0, -1).ISOWeek()
|
||||||
|
// 发送词云
|
||||||
|
fileName := fmt.Sprintf("%d%d_%s.png", year, weekNo, id)
|
||||||
|
utils.SendImage(id, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user