Detect temporal expressions in Slack messages (_tomorrow at 5 pm_) and translate them for readers in other timezones.
Project description
Slack Time Localization Bot
Detect temporal expressions in Slack messages (tomorrow at 5 pm) and translate them for readers in other timezones.
Quickstart
Create a Slack app with the following manifest:
display_information:
name: Time Localization
description: Detect temporal expressions in Slack messages ("tomorrow at 5 pm") and translate them for readers in other timezones.
background_color: "#240b24"
features:
app_home:
home_tab_enabled: false
messages_tab_enabled: true
messages_tab_read_only_enabled: false
bot_user:
display_name: Time Localization
always_online: true
oauth_config:
scopes:
bot:
- app_mentions:read
- channels:history
- chat:write
- groups:history
- groups:write
- im:history
- im:write
- mpim:history
- mpim:write
- users:read
- channels:read
- groups:read
- mpim:read
- im:read
settings:
event_subscriptions:
bot_events:
- app_home_opened
- app_mention
- channel_history_changed
- group_history_changed
- im_history_changed
- message.channels
- message.groups
- message.im
- message.mpim
interactivity:
is_enabled: true
org_deploy_enabled: false
socket_mode_enabled: true
token_rotation_enabled: false
Create and get the bot token (under "OAuth & Permissions") and app token (under "Basic Information") for your Slack app.
pip install slack-time-localization-bot
ℹ️ Currently only Linx x86_64 is supported
Finally you can run it with
export SLACK_BOT_TOKEN=xoxb-...
export SLACK_APP_TOKEN=xapp-...
slack-time-localization-bot
You can now invite the bot to a conversation is slack and the bot will translate temporal expressions for every message.
Running Tests
Install poetry and run
poetry install
poetry run pytest ./slack_time_localization_bot
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for slack_time_localization_bot-0.1.0.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 692ebda10653e8e3cabb4274c095c64bdcb181dab19387444ac23b51b9652014 |
|
MD5 | 65283963b6957ecc8e88c57cbd51aad7 |
|
BLAKE2b-256 | 6392e1e1ea79dac43a5c6082015741fd4d366b585956b4986ec31ca0407d1d82 |
Close
Hashes for slack_time_localization_bot-0.1.0.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 909e950112b5015b29a78d592deea4601d9d005d168668e813ed9f5be4353786 |
|
MD5 | 248c2d6b3676394c4b0e2332e148bb85 |
|
BLAKE2b-256 | 610b4bf3dd889dc1dcd87fb67586dda98d8236b0a98a7040ecbb01f3c824ac11 |