Finding the most popular reaction in Slack
source link: https://hannes.enjoys.it/blog/2020/12/finding-the-most-popular-reaction-in-slack/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Finding the most popular reaction in Slack
This can be run against a Slack export. It will count the reactions used and display them in an ordered list. Written for readability not speed or efficiency. No guarantees that this isn’t terribly broken. Enjoy and use responsibly!
import json
import glob
import collections
# collect messages
messages = []
for filename in glob.glob('*/*.json'):
with open(filename) as f:
messages += json.load(f)
# extract reactions
reactions = []
for message in messages:
if "reactions" in message:
reactions += message["reactions"]
# count reactions
reaction_counter = collections.Counter()
for reaction in reactions:
reaction_counter.update({reaction["name"]: reaction["count"]})
# done, print them
print(reaction_counter.most_common())
Post navigation
← DCP-L2530DW printer/scanner on ArchlinuxThis site uses Akismet to reduce spam. Learn how your comment data is processed.
Recommend
-
37
The reaction to the Redmi K20’s price shows there’s still a place for a POCO F2In the middle of 2018, information first surfaced about
-
26
无法访问此网站 9to5google.com 意外终止了连接。 ...
-
57
-
10
Finding Domain Experts with Slack
-
1
Mozilla Reaction to U.S. v. G...
-
10
in which we cater to those with an allergic reaction to parentheses A
-
4
三度微博热搜,270万视频播放,reaction视频为何这么火?36氪的朋友们 · 8小时前【套娃警告】我通过视频看别人看视频。编者按:本文来...
-
5
美味值:🌟🌟🌟🌟🌟口味:铁锅炖排骨文章尽可能的以图文形式还原尤大的直播内容(为了你有更好的观看体验,欧巴添加了一些相关链接)。还没观看的同学可以和大家一起来一波图文 Reaction,看过的同学也可...
-
1
TV shows are far more popular than movies, and other interesting Netflix findings TV shows are far more popular than movies, and other interesting Netflix findings Netflix is a TV-first platform...
-
1
Slack’s Most Confusing UX WritingWant to make sure someone sees this? Reply anyway.Published in
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK