Weechat wee-slack

From wikinotes

Access slack from within weechat.

Documentation

github https://github.com/wee-slack/wee-slack

Install

pacman -S python-websocket-client  # Arch
ipkg install py36-websocket-client # FreeBSD
pip3 install websocket-client      # General
mkdir -p ~/.weechat/python/autoload
cd ~/.weechat/python
curl -O https://raw.githubusercontent.com/wee-slack/wee-slack/master/wee_slack.py
ln -s ../wee_slack.py autoload/

Configuration

Add API tokens

OAuth

Only works if wee-slack is pre-approved.

/slack register  #

Session Token

Source https://www.nicksantamaria.net/post/slack-token-from-web-interface/

https://github.com/emtunc/SlackPirate
virtualenv venv
venv/bin/pip install -r requirements.txt
# login to domain's workspace in a web-browser
https://app.slack.com/client/T7FPSMV8F/C7EK0P3R9

# FIREFOX: dev-tools/Storage:
#   cookies:
#       d: <-- copy cookie

venv/bin/python SlackPirate --cookie $COOKIE
# slack
/slack register $TOKEN
/python reload slack
/secure set slack_token <YOUR_SLACK_TOKEN>
/set plugins.var.python.slack.slack_api_token ${sec.data.slack_token}

Usage

/slack help # see '#weechat' channel

/thread        # opens last thread
/thread ${ID}  # opens target thread

TODO:

ctrl+o to open channel in web browser