diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2018-11-07 18:11:22 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-01-26 12:51:07 +0100 |
commit | a9284f59640a7dc68190da28da3f405dc33f4e87 (patch) | |
tree | a63e97f4c40d3032c4108515a051012aa00ee2df /README.md | |
parent | a9a2ffc6a9db25eba33378544f24ff4a7204fd5a (diff) | |
download | wee-slack-a9284f59640a7dc68190da28da3f405dc33f4e87.tar.gz |
Update readme
Instead of duplicating much of the documentation for commands and
options, refer to the /set and /help commands in weechat.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 155 |
1 files changed, 33 insertions, 122 deletions
@@ -8,33 +8,24 @@ A WeeChat native client for Slack.com. Provides supplemental features only avail Features -------- * [Threads](#threads) support - * [Slack Status](#status) support + * Slack status support * Slash commands (including custom ones) * Upload to slack capabilities * Emoji reactions * Edited messages work just like the official clients, where the original message changes and has (edited) appended. * Unfurled urls dont generate a new message, but replace the original with more info as it is received. - * Regex style message editing (s/oldtext/newtext/) + * Regex message editing (s/oldtext/newtext/) * Smarter redraw of dynamic buffer info (much lower CPU %) - * beta UTF-8 support - * Doesn't use IRC gateway. Connects directly with Slack via API/Websocket * Multiple Teams supported. Just add multiple api tokens separated by commas * Replays history automatically during startup. (and sets read marker to the correct position in history) * Open channels synchronized with Slack. When you open/close a channel on another client it is reflected in wee-slack - * Colorized nicks in buffer list when used with buffers.pl * Colorized nicks in chat * Supports bidirectional slack read notifications for all channels. (never reread the same messages on the web client or other devices). * Typing notification, so you can see when others are typing, and they can see when you type. Appears globally for direct messages * Away/back status handling * Expands/shows metadata for things like tweets/links - * Displays edited messages (slack.com irc mode currently doesn't show these) * *Super fun* debug mode. See what the websocket is saying -In Development --------------- - * add notification of new versions of wee-slack - - Dependencies ------------ * WeeChat 1.3+ http://weechat.org/ @@ -43,20 +34,7 @@ Dependencies Be sure that your weechat supports python plugins. Under Debian, install `weechat-python` Setup ------- - - -#### 0. - -wee-slack doesn't use the Slack IRC gateway. If you currently connect via the gateway, you should probably remove the server definition. - -``` -/server list - All servers: - slack -/server del slack -/python reload -``` +----- #### 1. Install dependencies @@ -76,10 +54,11 @@ sudo /usr/local/opt/python@2/bin/pip2 install websocket_client pkg install py27-websocket-client py27-six ``` -#### 2. copy wee_slack.py to ~/.weechat/python/autoload +#### 2. copy wee_slack.py to ~/.weechat/python ``` +cd ~/.weechat/python wget https://raw.githubusercontent.com/wee-slack/wee-slack/master/wee_slack.py -cp wee_slack.py ~/.weechat/python/autoload +ln -s ../wee_slack.py autoload ``` #### 3. Start WeeChat @@ -106,7 +85,7 @@ the browser and pass it to this command: ``` Your Slack team is now added, and you can complete setup by restarting the -wee-slack plugin. +wee-slack script. ``` /python reload slack @@ -128,81 +107,54 @@ If you don't want to store your API token in plaintext you can use the secure fe /set plugins.var.python.slack.slack_api_token ${sec.data.slack_token} ``` -##### Optional: If you would like to connect to multiple groups, use the above command with multiple tokens separated by commas. +##### Optional: Connecting to multiple teams -``` -/set plugins.var.python.slack.slack_api_token [token1],[token2],[token3] -``` +You can run the register command multiple times to connect to multiple teams. +If you set the token yourself, you can use the above command with multiple +tokens separated by commas. -### 5. $PROFIT$ ``` -/save -/python reload -``` - -Commands --------- - -Join a channel: -``` -/join [channel] -``` - -Start a direct chat with someone or multiple users: -``` -/query <username>[,<username2>[,<username3>...]] -/slack talk <username>[,<username2>[,<username3>...]] +/set plugins.var.python.slack.slack_api_token [token1],[token2],[token3] ``` -List channels: -``` -/slack channels -``` +Commands and options +-------------------- -List users: +See all available options with descriptions: ``` -/slack users +/set slack ``` -Close channel/dm: -``` -/part -/leave -/close -``` +Most options require that you reload the script with `/python reload slack` +after changing it to take effect. -Set yourself away/back: +See all available commands with descriptions: ``` -/slack away -/slack back +/slack help ``` -Toggle muting of the current channel: -``` -/slack mute -``` +In addition to the commands listed with `/slack help`, most normal IRC +commands, like `/join`, `/part`, `/query`, `/msg`, `/me`, `/topic`, `/away` and +`/whois` work normally. See WeeChat's documentation or `/help <cmd>` if you are +unfamiliar with these. -List muted channels for the current team: -``` -/slack showmuted -``` +There are also some special messages you can send: -Modify previous message: +Modify previous message using regex: ``` s/old text/new text/ ``` -Modify 3rd previous message: +Modify 3rd previous message using regex: ``` 3s/old text/new text/ ``` -Replace all instances of text in previous message: +Replace all instances of text in previous message using regex: ``` s/old text/new text/g ``` - Delete previous message: ``` s/// @@ -213,23 +165,6 @@ Add a reaction to the nth last message. The number can be omitted and defaults t 3+:smile: ``` -Upload a file to the current slack buffer: -``` -/slack upload [file_path] -``` - -Run a Slack slash command. Simply prepend `/slack slash` to what you'd type in the official clients.: -``` -/slack slash /desiredcommand arg1 arg2 arg3 -``` - -Paste in the input the slack link to some message: -``` -/slack linkarchive [$]message_id -``` -This command is intended to be used with the mouse or cursor mode (see -below section). - To send a command as a normal message instead of performing the action, prefix it with a slash or a space, like so: ``` //slack @@ -254,21 +189,13 @@ Label a thread with a memorable name. The above command will open a channel call ``` _Note: labels do not persist once a thread buffer is closed_ -#### Status - -Set your Slack status on a given team: -``` -/slack status [:emoji:] [Status message] -``` - -Example: -``` -/slack status :ghost: Boo! -``` - #### Emoji tab completions -To enable tab completion of emojis, copy or symlink the `weemoji.json` file to your weechat config directory (e.g. `~/.weechat`). Then append `|%(emoji)` to the `weechat.completion.default_template` config option, e.g. like this: +To enable tab completion of emojis, copy or symlink the `weemoji.json` file to +your weechat config directory (e.g. `~/.weechat`). If doing this after starting +wee-slack, you will have to reload it by running `/python reload slack`. Then +append `|%(emoji)` to the `weechat.completion.default_template` config option, +e.g. like this: ``` /set weechat.completion.default_template "%(nicks)|%(irc_channels)|%(emoji)" @@ -313,16 +240,6 @@ You may remove a team by removing its token from the dedicated comma-separated l Optional settings ----------------- -Set channel prefix to something other than my-slack-subdomain.slack.com (e.g. when using buffers.pl): -``` -/set plugins.var.python.slack.server_aliases "my-slack-subdomain:mysub,other-domain:coolbeans" -``` - -Show who added each reaction. Makes reactions appear like `[:smile:(@nick1,@nick2)]` instead of `[:smile:2]`. -``` -/set plugins.var.python.slack.show_reaction_nicks on -``` - Show typing notification in main bar (slack_typing_notice): ``` /set weechat.bar.status.items [buffer_count],[buffer_plugin],buffer_number+:+buffer_name+{buffer_nicklist_count}+buffer_filter,[hotlist],completion,scroll,slack_typing_notice @@ -350,13 +267,7 @@ Dump the JSON responses in `/tmp/weeslack-debug/`. Requires a script reload. /set plugins.var.python.slack.record_events true ``` - Support -------------- wee-slack is provided without any warranty whatsoever, but you are welcome to ask questions in #wee-slack on freenode. - - - - - |