diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-12 21:33:53 +0100 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2023-01-12 21:33:53 +0100 |
commit | 7cb730861db2c27cd285fc34a396fc63f6e6270c (patch) | |
tree | 2b5018c3e659c9dceda56cdffbfffd925d2dd505 | |
parent | 6214c87ea5d81f773a34bd1dfaa333d5c3e12004 (diff) | |
download | wee-slack-7cb730861db2c27cd285fc34a396fc63f6e6270c.tar.gz |
Capitalize WeeChat correctly in the docs
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | README.md | 18 | ||||
-rw-r--r-- | docs/Options.md | 8 | ||||
-rwxr-xr-x | generate_docs.py | 2 | ||||
-rw-r--r-- | wee_slack.py | 42 |
5 files changed, 37 insertions, 37 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b1969b3..03d9593 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -172,7 +172,7 @@ Note that you need to update the `weemoji.json` file when upgrading to this vers ## 2.4.0 (2020-01-16) - Support regex flags i, m and s for message edits. -- Allow %h (weechat home) replacement in download_location (PR #690). +- Allow %h (WeeChat home) replacement in download_location (PR #690). - Render "by invitation from" before reactions. - The command `/slack status` now prints the status if no arguments are given. Pass `-delete` to unset the status (fixes #574). - Add completion for channel names (fixes #235). @@ -217,7 +217,7 @@ Note that you need to update the `weemoji.json` file when upgrading to this vers - Add option `files_download_location` to download uploaded files automatically (fixes #562, PR #666). - Add option `show_buflist_presence` to show/hide presence from buflist (PR #558). - Add command `/help` and add descriptions for all commands (fixes #363). -- Remove command `/leave` (weechat aliases it to `/part` by default so we don't need to implement it specifically). +- Remove command `/leave` (WeeChat aliases it to `/part` by default so we don't need to implement it specifically). - Remove command `/slack p` (only used for debugging). - Remove command `/slack openweb`, use `/slack linkarchive` instead. - Make command `/thread` open last thread in channel when called without arguments (PR #677). @@ -69,8 +69,8 @@ Dependencies * WeeChat 1.3+ http://weechat.org/ * websocket-client https://pypi.python.org/pypi/websocket-client/ * Since WeeChat 2.6, Python 3 modules are required, see https://weechat.org/blog/post/2019/07/02/Python-3-by-default - * Some distributions package weechat's plugin functionalities in separate packages. - Be sure that your weechat supports python plugins. Under Debian, install `weechat-python` + * Some distributions package WeeChat's plugin functionalities in separate packages. + Be sure that your WeeChat supports python plugins. Under Debian, install `weechat-python` Setup ----- @@ -79,7 +79,7 @@ Setup **Arch Linux**: `pacman -S python-websocket-client` -**Debian/Ubuntu**: `apt install weechat-python python-websocket`. If using weechat 2.6 or newer, run `apt install weechat-python python3-websocket` instead. +**Debian/Ubuntu**: `apt install weechat-python python-websocket`. If using WeeChat 2.6 or newer, run `apt install weechat-python python3-websocket` instead. **Fedora**: `dnf install python3-websocket-client` @@ -89,7 +89,7 @@ Setup **Other**: `pip3 install websocket-client` -Note for **macOS**: If you installed weechat with Homebrew, you will have to locate the python runtime environment used. +Note for **macOS**: If you installed WeeChat with Homebrew, you will have to locate the python runtime environment used. If `--with-python@2` was used, you should use: `sudo /usr/local/opt/python@2/bin/pip2 install websocket_client` ### 2. Download wee\_slack.py @@ -116,7 +116,7 @@ ln -s ../wee_slack.py weechat ``` -**NOTE:** If weechat is already running, the script can be loaded using `/python load wee_slack.py`. +**NOTE:** If WeeChat is already running, the script can be loaded using `/python load wee_slack.py`. ### 4. Add your Slack API token(s) @@ -307,7 +307,7 @@ _Note: labels do not persist once a thread buffer is closed_ To enable rendering of emoji characters and tab completion of emoji names, copy or symlink the [`weemoji.json`](https://github.com/wee-slack/wee-slack/blob/master/weemoji.json) -file to your weechat config directory (e.g. `~/.weechat`). If doing this after +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: @@ -340,12 +340,12 @@ The cursor mode and mouse mode can be used to interact with older messages, for If mouse mode is enabled, the default behavior when right-clicking on a message is to paste its id in the input. It can be used in `/reply`, `s/` substitution/deletion and in `+:emoji:` commands instead of a message number. It can also be used as an argument to the `/slack linkarchive` command. -In cursor mode, the `M` key achieves the same result (memo: the default for weechat is to paste the message with `m`, `M` simply copies the id). +In cursor mode, the `M` key achieves the same result (memo: the default for WeeChat is to paste the message with `m`, `M` simply copies the id). In addition, `R` will prepare a `/reply id` and `D` will delete the message (provided it's yours). `T` will open the thread associated to a message, equivalent to `/thread id` `L` will call the `/slack linkarchive` command behind the hood and paste it to the current input. -Please see weechat's documentation about [how to use the cursor mode](https://weechat.org/files/doc/stable/weechat_user.en.html#key_bindings_cursor_context) or [adapt the bindings](https://weechat.org/files/doc/stable/weechat_user.en.html#command_weechat_key) to your preference. +Please see WeeChat's documentation about [how to use the cursor mode](https://weechat.org/files/doc/stable/weechat_user.en.html#key_bindings_cursor_context) or [adapt the bindings](https://weechat.org/files/doc/stable/weechat_user.en.html#command_weechat_key) to your preference. Default key bindings: ``` @@ -451,7 +451,7 @@ default, but should work after running these commands: /key bind ctrl-J /input magic_enter ``` -You may also want to disable weechats paste prompt, since that is not necessary +You may also want to disable WeeChat's paste prompt, since that is not necessary when using `multiline.pl`: ``` diff --git a/docs/Options.md b/docs/Options.md index 550a2e9..a57974a 100644 --- a/docs/Options.md +++ b/docs/Options.md @@ -8,7 +8,7 @@ You can set these options by using: You can also see all the options and set them them interactively by running `/fset slack`. -Note that the default value will be shown as an empty string in weechat. +Note that the default value will be shown as an empty string in WeeChat. The actual default values are listed below. Most options require that you reload the script with `/python reload @@ -176,19 +176,19 @@ slack` after changing it to take effect. **Default:** `bold` -**Description:** When receiving bold text from Slack, render it as this in weechat. +**Description:** When receiving bold text from Slack, render it as this in WeeChat. ### render_emoji_as_string **Default:** `false` -**Description:** Render emojis as :emoji_name: instead of emoji characters. Enable this if your terminal doesn't support emojis, or set to 'both' if you want to see both renderings. Note that even though this is disabled by default, you need to place https://github.com/wee-slack/wee-slack/blob/master/weemoji.json in your weechat directory to enable rendering emojis as emoji characters. +**Description:** Render emojis as :emoji_name: instead of emoji characters. Enable this if your terminal doesn't support emojis, or set to 'both' if you want to see both renderings. Note that even though this is disabled by default, you need to place https://github.com/wee-slack/wee-slack/blob/master/weemoji.json in your WeeChat directory to enable rendering emojis as emoji characters. ### render_italic_as **Default:** `italic` -**Description:** When receiving bold text from Slack, render it as this in weechat. If your terminal lacks italic support, consider using "underline" instead. +**Description:** When receiving bold text from Slack, render it as this in WeeChat. If your terminal lacks italic support, consider using "underline" instead. ### send_typing_notice diff --git a/generate_docs.py b/generate_docs.py index 3a421f1..052c96b 100755 --- a/generate_docs.py +++ b/generate_docs.py @@ -62,7 +62,7 @@ with open("docs/Options.md", "w") as file_options: You can also see all the options and set them them interactively by running `/fset slack`. - Note that the default value will be shown as an empty string in weechat. + Note that the default value will be shown as an empty string in WeeChat. The actual default values are listed below. Most options require that you reload the script with `/python reload diff --git a/wee_slack.py b/wee_slack.py index fd7e530..14c3607 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -78,7 +78,7 @@ SCRIPT_NAME = "slack" SCRIPT_AUTHOR = "Trygve Aaberge <trygveaa@gmail.com>" SCRIPT_VERSION = "2.9.1" SCRIPT_LICENSE = "MIT" -SCRIPT_DESC = "Extends weechat for typing notification/search/etc on slack.com" +SCRIPT_DESC = "Extends WeeChat for typing notification/search/etc on slack.com" REPO_URL = "https://github.com/wee-slack/wee-slack" TYPING_DURATION = 6 @@ -179,7 +179,7 @@ def slack_buffer_required(f): def utf8_decode(f): """ Decode all arguments from byte strings to unicode strings. Use this for - functions called from outside of this script, e.g. callbacks from weechat. + functions called from outside of this script, e.g. callbacks from WeeChat. """ @wraps(f) @@ -569,7 +569,7 @@ class EventRouter(object): def store_context(self, data): """ A place to store data and vars needed by callback returns. We need this because - weechat's "callback_data" has a limited size and weechat will crash if you exceed + WeeChat's "callback_data" has a limited size and WeeChat will crash if you exceed this size. """ identifier = "".join( @@ -582,7 +582,7 @@ class EventRouter(object): def retrieve_context(self, identifier): """ A place to retrieve data and vars needed by callback returns. We need this because - weechat's "callback_data" has a limited size and weechat will crash if you exceed + WeeChat's "callback_data" has a limited size and WeeChat will crash if you exceed this size. """ return self.context.get(identifier) @@ -725,7 +725,7 @@ class EventRouter(object): """ complete Receives the result of an http request we previously handed - off to weechat (weechat bundles libcurl). Weechat can fragment + off to WeeChat (WeeChat bundles libcurl). WeeChat can fragment replies, so it buffers them until the reply is complete. It is then populated with metadata here so we can identify where the request originated and route properly. @@ -901,7 +901,7 @@ def handle_next(data, remaining_calls): class WeechatController(object): """ - Encapsulates our interaction with weechat + Encapsulates our interaction with WeeChat """ def __init__(self, eventrouter): @@ -916,7 +916,7 @@ class WeechatController(object): def register_buffer(self, buffer_ptr, channel): """ complete - Adds a weechat buffer to the list of handled buffers for this EventRouter + Adds a WeeChat buffer to the list of handled buffers for this EventRouter """ if isinstance(buffer_ptr, basestring): self.buffers[buffer_ptr] = channel @@ -926,7 +926,7 @@ class WeechatController(object): def unregister_buffer(self, buffer_ptr, update_remote=False, close_buffer=False): """ complete - Adds a weechat buffer to the list of handled buffers for this EventRouter + Adds a WeeChat buffer to the list of handled buffers for this EventRouter """ channel = self.buffers.get(buffer_ptr) if channel: @@ -955,7 +955,7 @@ def local_process_async_slack_api_request(request, event_router): """ complete Sends an API request to Slack. You'll need to give this a well formed SlackRequest object. - DEBUGGING!!! The context here cannot be very large. Weechat will crash. + DEBUGGING!!! The context here cannot be very large. WeeChat will crash. """ if not event_router.shutting_down: weechat_request = "url:{}".format(request.request_string()) @@ -1022,7 +1022,7 @@ def buffer_renamed_cb(data, signal, current_buffer): @utf8_decode def buffer_closing_callback(data, signal, current_buffer): """ - Receives a callback from weechat when a buffer is being closed. + Receives a callback from WeeChat when a buffer is being closed. """ EVENTROUTER.weechat_controller.unregister_buffer(current_buffer, True, False) return w.WEECHAT_RC_OK @@ -1094,7 +1094,7 @@ def input_text_for_buffer_cb(data, modifier, current_buffer, string): @utf8_decode def buffer_switch_callback(data, signal, current_buffer): """ - Every time we change channels in weechat, we call this to: + Every time we change channels in WeeChat, we call this to: 1) set read marker 2) determine if we have already populated channel history data 3) set presence to active """ @@ -1375,7 +1375,7 @@ def usergroups_completion_cb(data, completion_item, current_buffer, completion): def complete_next_cb(data, current_buffer, command): """Extract current word, if it is equal to a nick, prefix it with @ and rely on nick_completion_cb adding the @-prefixed versions to the - completion lists, then let Weechat's internal completion do its + completion lists, then let WeeChat's internal completion do its thing """ current_channel = EVENTROUTER.weechat_controller.buffers.get(current_buffer) @@ -2398,7 +2398,7 @@ class SlackChannel(SlackChannelCommon): def create_buffer(self): """ - Creates the weechat buffer where the channel magic happens. + Creates the WeeChat buffer where the channel magic happens. """ if not self.channel_buffer: self.active = True @@ -2944,7 +2944,7 @@ class SlackPrivateChannel(SlackGroupChannel): class SlackMPDMChannel(SlackChannel): """ An MPDM channel is a special instance of a 'group' channel. - We change the name to look less terrible in weechat. + We change the name to look less terrible in WeeChat. """ def __init__(self, eventrouter, team_users, myidentifier, **kwargs): @@ -3183,7 +3183,7 @@ class SlackThreadChannel(SlackChannelCommon): def create_buffer(self): """ - Creates the weechat buffer where the thread magic happens. + Creates the WeeChat buffer where the thread magic happens. """ if not self.channel_buffer: self.channel_buffer = w.buffer_new( @@ -5259,10 +5259,10 @@ def command_register(data, current_buffer, args): if not code: if nothirdparty: nothirdparty_note = "" - last_step = "You will see a message that the site can't be reached, this is expected. The URL for the page will have a code in it of the form `?code=<code>`. Copy the code after the equals sign, return to weechat and run `/slack register -nothirdparty <code>`." + last_step = "You will see a message that the site can't be reached, this is expected. The URL for the page will have a code in it of the form `?code=<code>`. Copy the code after the equals sign, return to WeeChat and run `/slack register -nothirdparty <code>`." else: nothirdparty_note = "\nNote that by default GitHub Pages will see a temporary code used to create your token (but not the token itself). If you're worried about this, you can use the -nothirdparty option, though the process will be a bit less user friendly." - last_step = "The web page will show a command in the form `/slack register <code>`. Run this command in weechat." + last_step = "The web page will show a command in the form `/slack register <code>`. Run this command in WeeChat." message = ( textwrap.dedent( """ @@ -6537,7 +6537,7 @@ class PluginConfig(object): ), "render_bold_as": Setting( default="bold", - desc="When receiving bold text from Slack, render it as this in weechat.", + desc="When receiving bold text from Slack, render it as this in WeeChat.", ), "render_emoji_as_string": Setting( default="false", @@ -6545,13 +6545,13 @@ class PluginConfig(object): " if your terminal doesn't support emojis, or set to 'both' if you want to" " see both renderings. Note that even though this is" " disabled by default, you need to place {}/blob/master/weemoji.json in your" - " weechat directory to enable rendering emojis as emoji characters.".format( + " WeeChat directory to enable rendering emojis as emoji characters.".format( REPO_URL ), ), "render_italic_as": Setting( default="italic", - desc="When receiving bold text from Slack, render it as this in weechat." + desc="When receiving bold text from Slack, render it as this in WeeChat." ' If your terminal lacks italic support, consider using "underline" instead.', ), "send_typing_notice": Setting( @@ -7105,7 +7105,7 @@ if __name__ == "__main__": if weechat_version < 0x2020000: w.prnt( "", - "\nERROR: Weechat version 2.2+ is required to use {}.\n\n".format( + "\nERROR: WeeChat version 2.2+ is required to use {}.\n\n".format( SCRIPT_NAME ), ) |