Slak is a command line tool for collecting data from Slack and makes you look like a pro when using it. ⚡️
Here are the examples:
$ slak query-reacts $LINK --count | sort -nr
100 likeapro
50 slak
25 zap
$ slak query-reacts $LINK --users --clicked likeapro | slak query-users
mosky@idontlikespam.anyway
randcat@idontcarespam.anyway
...
$ slak how-to-get-a-token
How to get a token?
...
Yes, it also teaches you how to be a pro. ✨
PyPI is too old school to a cool kit: 😎
$ pip install git+https://github.com/moskytw/slak.git
Or a stable version:
$ pip install git+https://github.com/moskytw/slak.git@v1.0.1
The command is a single Python script shipped with full tests and Pipfile.lock. You can always:
$ pipenv sync --dev
...
All dependencies are now up-to-date!
$ pipenv run pytest -q
...........
11 passed in 0.15s
So, it should be super easy to extend. PR is welcome!
$ slak how-to-get-a-token
How to get a token?
...
$ slak query-reacts https://likeapro.slack.com/archives/C12AB1234/p1234567711085949
slak
likeapro
zap
$ slak query-reacts $LINK --count
50 slak
100 likeapro
25 zap
$ slak query-reacts $LINK --count | sort -nr
100 likeapro
50 slak
25 zap
$ slak query-reacts $LINK --users
...
likeapro UMOSKY
likeapro URANDCAT
...
zap URANDCAT
$ slak query-reacts $LINK --users --clicked likeapro
UMOSKY
URANDCAT
...
$ slak query-reacts $LINK --users --clicked likeapro | slak query-users
mosky@idontlikespam.anyway
randcat@idontcare.anyway
...
$ slak query-reacts $LINK --users --clicked likeapro | slak query-users --names --titles
mosky@idontlikespam.anyway Mosky Liu Slak Author
randcat@idontcarespam.anyway Rand Cat Lying There
...
$ slak query-reacts $LINK --users | cut -f2 | sort -u | slak query-users
mosky.liu@idontlikespam.anyway
randcat@idontcarespam.anyway
...
$ slak query-users UMOSKY URANDCAT --jsonl | jq '[.user.profile.email, .user.profile.display_name] | @tsv' -r
mosky@idontlikespam.anyway Mosky
randcat@idontcarespam.anyway ICat
Enjoy! 🍻