Compare commits
No commits in common. "c40dbead3e626ac8c1204b3d3896c8c26a9bca14" and "e2029e48c56b9202d5f13c732af9bba17711c007" have entirely different histories.
c40dbead3e
...
e2029e48c5
@ -50,7 +50,3 @@ resource:
|
|||||||
welcome-new:
|
welcome-new:
|
||||||
type: emotion
|
type: emotion
|
||||||
path: 58e4150be2bba8f7b71974b10391f9e9
|
path: 58e4150be2bba8f7b71974b10391f9e9
|
||||||
# 水群排行榜词云,只能是图片,末尾的`\%s`也是必须的
|
|
||||||
wordcloud:
|
|
||||||
type: image
|
|
||||||
path: D:\Share\wordcloud\%s
|
|
||||||
|
@ -2,7 +2,6 @@ package watergroup
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go-wechat/config"
|
|
||||||
"go-wechat/service"
|
"go-wechat/service"
|
||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
@ -22,17 +21,11 @@ func Month() {
|
|||||||
for _, group := range groups {
|
for _, group := range groups {
|
||||||
// 消息统计
|
// 消息统计
|
||||||
dealMonth(group.Wxid)
|
dealMonth(group.Wxid)
|
||||||
|
|
||||||
res, ok := config.Conf.Resource["wordcloud"]
|
|
||||||
if !ok {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取上个月月份
|
// 获取上个月月份
|
||||||
yd := time.Now().Local().AddDate(0, 0, -1).Format("200601")
|
yd := time.Now().Local().AddDate(0, 0, -1).Format("200601")
|
||||||
// 发送词云
|
// 发送词云
|
||||||
fileName := fmt.Sprintf("%s_%s.png", yd, group.Wxid)
|
fileName := fmt.Sprintf("%s_%s.png", yd, group.Wxid)
|
||||||
utils.SendImage(group.Wxid, fmt.Sprintf(res.Path, fileName), 0)
|
utils.SendImage(group.Wxid, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package watergroup
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go-wechat/config"
|
|
||||||
"go-wechat/service"
|
"go-wechat/service"
|
||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
@ -22,17 +21,11 @@ func Week() {
|
|||||||
for _, group := range groups {
|
for _, group := range groups {
|
||||||
// 消息统计
|
// 消息统计
|
||||||
dealWeek(group.Wxid)
|
dealWeek(group.Wxid)
|
||||||
|
|
||||||
res, ok := config.Conf.Resource["wordcloud"]
|
|
||||||
if !ok {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取上周周数
|
// 获取上周周数
|
||||||
year, weekNo := time.Now().Local().AddDate(0, 0, -1).ISOWeek()
|
year, weekNo := time.Now().Local().AddDate(0, 0, -1).ISOWeek()
|
||||||
// 发送词云
|
// 发送词云
|
||||||
fileName := fmt.Sprintf("%d%d_%s.png", year, weekNo, group.Wxid)
|
fileName := fmt.Sprintf("%d%d_%s.png", year, weekNo, group.Wxid)
|
||||||
utils.SendImage(group.Wxid, fmt.Sprintf(res.Path, fileName), 0)
|
utils.SendImage(group.Wxid, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@ package watergroup
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go-wechat/config"
|
|
||||||
"go-wechat/service"
|
"go-wechat/service"
|
||||||
"go-wechat/utils"
|
"go-wechat/utils"
|
||||||
"log"
|
"log"
|
||||||
@ -24,17 +23,11 @@ func Yesterday() {
|
|||||||
for _, group := range groups {
|
for _, group := range groups {
|
||||||
// 消息统计
|
// 消息统计
|
||||||
dealYesterday(group.Wxid)
|
dealYesterday(group.Wxid)
|
||||||
|
|
||||||
res, ok := config.Conf.Resource["wordcloud"]
|
|
||||||
if !ok {
|
|
||||||
continue
|
|
||||||
}
|
|
||||||
|
|
||||||
// 获取昨日日期
|
// 获取昨日日期
|
||||||
yd := time.Now().Local().AddDate(0, 0, -1).Format("20060102")
|
yd := time.Now().Local().AddDate(0, 0, -1).Format("20060102")
|
||||||
// 发送词云
|
// 发送词云
|
||||||
fileName := fmt.Sprintf("%s_%s.png", yd, group.Wxid)
|
fileName := fmt.Sprintf("%s_%s.png", yd, group.Wxid)
|
||||||
utils.SendImage(group.Wxid, fmt.Sprintf(res.Path, fileName), 0)
|
utils.SendImage(group.Wxid, "D:\\Share\\wordcloud\\"+fileName, 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user