Skip to content

πŸ“’ A simple tool to get immediate notifications in Slack once your Ukrainian colleagues become unavailable due to an air raid or artillery shelling threats.

License

malokhvii-eduard/raid

Repository files navigation

πŸ“’ Raid

A simple tool to get immediate notifications in Slack once your Ukrainian colleagues become unavailable due to an air raid or artillery shelling threats.

License pre-commit pre-commit.ci semantic-release Style Guide markdownlint commitlint flake8 bandit CI Workflow Release Workflow

πŸŽ‰ Features

  • πŸš€ Easy to use
  • πŸ”– Mention specific colleagues by area
  • 🌍 Multi-language
  • 🀝 Free, but you can make a donation to charity funds in Ukraine

🌻 Motivation

This tool is specifically designed to provide real-time updates on the safety status of colleagues in Ukraine during air raids or artillery shelling threats. It monitors an official Telegram channel that publishes threat notifications and sends an immediate Slack notification upon detection of a threat. The notification includes crucial information about the nature and location of the threat, enabling colleagues to take appropriate measures quickly and efficiently.

In addition, the tool allows for the efficient coordination and communication of all colleagues located in the affected area during a crisis. It can also mention specific colleagues by the area in which they are located, enabling them to coordinate and communicate more efficiently with one another. Organizations with colleagues working in Ukraine, who may be at risk of exposure to the Russian-Ukrainian war, can benefit greatly from this project for free. By proactively managing risks and prioritizing their employees' well-being, organizations can leverage this tool to safeguard their employees' safety.

✨ Getting Started

πŸ“¦ Installation

  1. Clone the Repository
  2. Install this Package (./poetry install)
  3. Get Telegram API identifier and key
  4. Create a Slack icoming webhook

πŸ‘€ Usage

raid --help # Show help and exit
raid --version # Show version and exit

raid # Notify about threats in all areas
raid --locale en # Send notifications in English

# Mention specific colleagues by area. Prepare a CSV file with two columns:
# a 'member_id' and an area 'hashtag'. You can find area hashtags in a
# Telegram channel @air_alert_ua
raid --members ./members.csv
raid --ignore-without-mentions # Skip notifications without mentions

❓ FAQs

πŸ™‹β€β™‚οΈ How to get the Telegram API identifier and key?

πŸ‘‰ To use the Telegram API, you will need to register your application and obtain API ID and API key. To do this, follow these steps:

  1. Go to the Telegram API website and log in using your Telegram account
  2. Click on the "Create a new application" button and fill in the required details, including the name and description of your application
  3. Once you have registered your app, you will be provided with an API key and an API identifier. Keep these credentials safe, as you will need them to use the tool

πŸŽ‰πŸ‘ That's it! Now you have Telegram API identifier and key.

πŸ™‹β€β™‚οΈ How to create a Slack icoming webhook?

πŸ‘‰ To create a new webhook integration in Slack, you will need to be a member of the workspace and have administrative access. Here's how to create a new webhook integration:

  1. Go to your Slack workspace and click on the gear icon to access the settings
  2. Click on "Add apps" and search for "Incoming Webhooks" in the search bar
  3. Click on "Add to Slack" and choose the channel you want the webhook to post messages to
  4. Click on "Authorize" to authorize the integration

Once you have created the webhook, you will need to configure it by setting the default username and icon, and customizing any other settings you want. Here's how to configure the webhook:

  1. Click on the "Webhooks" section in the integration settings and copy the webhook URL
  2. Choose a default username and icon for your webhook messages
  3. Customize any other settings you want, such as message formatting or notification preferences

πŸŽ‰πŸ‘ That's it! Now you have a webhook integration in Slack.

πŸ™‹β€β™‚οΈ How to find a Slack member ID?

πŸ‘‰ To find a Slack member ID, you can use one of the following methods:

πŸ”’ Use the Slack API. If you have access to the Slack API:

  1. Go to the Slack API documentation and find the users.list method
  2. Click on the "Test Method" button to try out the method. Authenticate with your Slack account and workspace. Once authenticated, the API will return a list of users in your workspace along with their user IDs

πŸ”“ Use the Slack web app. If you don't have access to the Slack API:

  1. Go to your Slack workspace and open the member's profile page
  2. Click on the three dots in the upper-right corner of the profile page and select "Copy member ID" from the dropdown menu. The member ID will be copied to your clipboard, and you can paste it wherever you need it

πŸŽ‰πŸ‘ That's it! With these methods, you should be able to find a Slack member ID quickly and easily.

πŸ™‹β€β™‚οΈ Where does the data come from?

πŸ‘‰ Data is taken from a Telegram channel @air_alert_ua.

πŸ› οΈ Tech Stack

EditorConfig Markdown Python Typer Telegram API Slack SDK pre-commit markdownlint commitlint semantic-release Shields.io Git GitHub GitHub Actions

✍️ Contributing

πŸ‘πŸŽ‰ First off, thanks for taking the time to contribute! πŸŽ‰πŸ‘

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/awesome-feature)
  3. Commit your Changes (git commit -m 'Add awesome feature')
  4. Push to the Branch (git push origin feature/awesome-feature)
  5. Open a Pull Request

πŸ’– Like this project?

Leave a ⭐ if you think this project is cool or useful for you.

⚠️ License

raid is licenced under the MIT License. See the LICENSE for more information.

About

πŸ“’ A simple tool to get immediate notifications in Slack once your Ukrainian colleagues become unavailable due to an air raid or artillery shelling threats.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks