Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

统计小帮手(statistic genie) #21

Open
suntong opened this issue Apr 11, 2020 · 6 comments
Open

统计小帮手(statistic genie) #21

suntong opened this issue Apr 11, 2020 · 6 comments

Comments

@suntong
Copy link

suntong commented Apr 11, 2020

统计小帮手(statistic genie)

  • 群里谁经常踊跃发言,大家一般都会有个直觉。但真要定性定量的出一张排行榜,一般人还做不到。
  • 再者,更重要的问题是,一方面群人满为患,很多人想进进不来,而另一方面,群里却存在着很多自从进群以后就从来没有参与交流过的僵尸用户。

发言排行榜鼓励积极参与者,用沉睡鞭策榜提醒不参与交流的用户,统计小帮手(statistic genie)能帮助群主更加有效的调动群成员的积极参与意识。

名词简介

每一个群成员都有以下(在统计区间内的)重要指数:

指数名称 含义 数据库字段名
贡献指数 发言总字数累计 word_total
爱心指数 发言后又撤回重新修改的总字数累计 correction_total
分享指数 除纯文字以外,任何其他分享的次数累计 share_count
热闹指数 贴表情包图的次数累计(表情包不统计在分享指数之中) ??_count

Plan

I plan to implement this once the go-wechaty project is usable.

This is just a blue-print for now, if anyone has any more interesting idea, please chip in. Feature planned in design phase would much easier than adding them later on when design is done.

Thanks

Planned commands

commands Explanation Plan/Implemented
sg-period set default reporting period from the command line. phase 1
sg-top give 发言排行榜, the top 10 (or 20 or defined value) of most participated users phase 1
sg-warn give 沉睡鞭策榜,the bottom 10 of least participated users, @ them when listing phase 1
sg-kick kick the person(s) given on the command line phase 2
sg-shovel kick bottom 10 of least participated users, @ them before kicking phase 2

Syntax

sg-period days-top [days-warn]

E.g.,

  • sg-period 7 30 means to give statistics of active users for the past week, and least active users for the past 30 days.

On second thought, I might not need this.

sg-top [number [period]]

E.g.,

  • sg-top, or sg-top 10 will give top 10 active users for the past week.
  • sg-top 20 10 will give top 20 active user for the past 10 days.

sg-warn [number [period]]

E.g.,

  • sg-warn or sg-warn 10, will warn the least 10 active users of the past 30 days.

sg-kick reason person [person...]

  • kick the person(s) given on the command line.
  • explain the reason and @ them before kicking.

E.g., sg-kick "group rule violation" @him @her ...

Question(s)

  • I remember it was difficult to get the "group alias" (named used within this group) from weixin API. That will affect the listing of all the lists, as not using the group alias might confuse some people. I don't know what's the situation now.

Design considerations

  • The "贡献指数" is named "word" total in DB, instead of "char" total, is manly for clarification purpose:
    • Each Chinese character will be counted as 1, yet
    • Each English word will be counted as 1, if they show up in the message
@huan
Copy link
Member

huan commented Apr 12, 2020

I'd like to suggest that we can move this issue to wechaty/whishlist because this is not related to the Go language?

@suntong
Copy link
Author

suntong commented Apr 12, 2020

It is actually indeed related to the Go language because that's what I'm planning to implement in.

Feel free to copy it there if you think it might stir up more discussion, :)

@huan
Copy link
Member

huan commented Apr 12, 2020

Great to know it's Go related!

So I'm very happy to keep it in the Go Wechaty repository, and looking forward to reading the code of this great Go Bot!

@fangmuke
Copy link

fangmuke commented Jul 28, 2020

hello,可能我最近在做的一个项目天梯符合你的一些需求,目前使用JavaScript,但我想之后可能会移植到Go,你的一些想法也给了我灵感,感谢!至于你的那个question,解应该是使用room.alias(contact),需要注意的是在使用之前应当使用room.sync()同步最新群组数据,否则可能出现获取群昵称错误。

@suntong
Copy link
Author

suntong commented Jul 28, 2020

Great!! So let me started then, but first will need to get a test token for that... was postponing because I was only given a week for the test token... will update...

@suntong
Copy link
Author

suntong commented Aug 2, 2020

QuickDBD-export.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants