This is for macOS High Sierra.
These instructions extend those on https://gist.github.com/fluxsauce/060ab39a4fb7b8fc89524690c727627b with a few things that went wrong for me.
You might find yourself without a Python installation via brew (even though you installed pyton via brew at some point in the past). That is important, however, because we need pip. Run
Run
env $PATH
The path /usr/local/bin should appear before /usr/bin. If not, you are using the relatively old Python provided by macOS.
To get a brew-installed Python 2.7.14 and Python 3.6.3, I had to forcefully remove Python and reinstall:
brew uninstall --ignore-dependencies python
brew uninstall --ignore-dependencies python3
brew install python
brew install python3
Check again if the first python in your path is from /usr/local/bin:
which python
should no longer point to /usr/bin, but to something like /usr/local/opt/python/libexec/bin/python.
weeslack is a plugin for weechat. It is written in Python, and hence we must make sure that we install weechat with support for Python:
brew install weechat --with-python --with-perl
pip install websocket-client
Do a
brew info weechat
and check if python is ticked. It must be.
Installing weeslack works via download via wget:
mkdir -p ~/.weechat/python/autoload
wget https://raw.githubusercontent.com/rawdigits/wee-slack/master/wee_slack.py -O ~/.weechat/python/autoload/wee_slack.py
If you run weechat now, you should get an error message complaining that the Slack legacy tokens are not known to the plugin. That is as it should be.
Quit weechat and go to your Slack. Under https://api.slack.com/custom-integrations/legacy-tokens, you will find the Legacy Token Generator. Generate tokens for all your teams that you want to use in weechat.
Start weechat again, and run:
weechat
/set plugins.var.python.slack.slack_api_token [YOUR_SLACK_TOKEN],[YOUR_OTHER_SLACK_TOKEN]
/save
/script install buffers.pl
/script autoload buffers.pl
/python reload
Note the comma-separated list of tokens.
That should give you your Slack teams.
According to https://gist.github.com/fluxsauce/060ab39a4fb7b8fc89524690c727627b, one can get the notification centre plugin to work. I haven't had success yet and will update this gist when I have it running.