Координируем строительство башни
Project description
wedne: координируем строительство башни
This project was built for a Russian-speaking community. An English version of this README is available as well.
В чатах "Вастрик Клуба" любят строить башни. Башни — это однобуквенные сообщения от участников, из которых может составиться слово. Самый важный башенный день — среда. В среду принято строить "ITSWEDNESDAYMYDUDES" и отправлять лягушек. Это непросто: постоянно кто-то хочет отправить сообщение между буквами. Клубчанин не может быть посередине, приходится выбирать между созиданием и разрушением.
wedne состоит из двух частей: wedne.server
и wedne.client
. Клиенты регистрируются в
общем сервере и получают команды: отправить такую-то букву в такое-то время.
Инструкции
Как строить башни?
Не обязательно быть программистом. Прочтите эту секцию и узнайте, как поучаствовать в строительстве.
- Скачайте на компьютер установщик Python,
- Пройдите установку (если спросят, отметьте "Add python.exe to PATH"),
- Откройте приложение "Терминал" или "Командную строку",
- Введите туда
python -m pip install wedne
— теперь вы установили wedne, - Наконец введите
python -m wedne
и залогиньтесь как в телеграме.
Теперь у вас работает клиент. Он подключится к серверу и начнет ждать команду. Когда придет время, в чат от вашего имени отправится буква.
Можете закрывать инструкцию.
Я продвинутый, могу ли я запустить через Docker?
docker run qwskr/wedne:latest
Я продвинутый, могу ли я запустить сервер?
Проще всего склонировать и запустить с помощью Docker Compose:
docker compose up
Без докера надо запустить API и обработчик задач:
python -m wedne.server run_api
python -m wedne.server consume_tasks
FAQ
Почему я должен входить в телеграм? Это безопасно?
wedne должен отправить букву в чат от какого-то аккаунта. При входе как раз подключается такой аккаунт. Исходный код открыт, можно проверить самому, как используются данные телеграма.
Без телеграма можно?
Нельзя.
До сих пор тревожно, как я могу запустить код из исходников?
- Склонируйте репозиторий (
git clone https://github.com/igoose1/wedne
), - Установите poetry (
pip install poetry
), - Перейдите в исходники и установите зависимости (
cd wedne; poetry install
), - Запустите wedne (
python -m wedne
).
Какие команды могут прийти с сервера?
Только команда из трех переменных: какую букву отправлять, когда отправлять и после кого
отправлять. Сервер не может скомандовать отправить слово или предложение — клиент такое не
примет. Сервер не может направить клиентов на другой чат — ID чата хранится на клиентах
локально. Схема команды: wedne/commands.py
Не могу запустить, помогите?
Спросите помощи в чате "Бар".
Ничего не понимаю, что за башни и что за клуб?
Кажется, вы не знаете про "Вастрик Клуб". Этот проект написан для него. Если вы не участник, вам wedne будет бесполезен.
wedne: coordinate the construction of the tower
Этот проект был сделан для русскоязычного сообщества. README на русском можно найти здесь.
In Vas3k Club chats, people like to build towers. Towers are one-letter messages from participants that can be combined to form a word. The main day for building towers is Wednesday. On Wednesday it is a tradition to build "ITSWEDNESDAYMYDUDES" and send pictures of frogs. It's not easy: someone always wants to send a message between the letters. A club member cannot be in the middle. He or she has to choose between creating and destroying.
wedne has two parts: wedne.server
and wedne.client
. The client connects to the public
server and receives instructions for the sending of a letter at a specific time.
Instructions
How to build towers?
You don't have to be a programmer. Read this section and find out how to get involved in construction.
- Download the Python installer to your computer,
- Go through the installation (if asked, check "Add python.exe to PATH"),
- Open the "Terminal" or "cmd.exe" application,
- Type
python -m pip install wedne
to install wedne, - Finally type
python -m wedne
and log in as in Telegram.
Your client is currently up and running. It will connect to the server and wait for a command. When the time is right, a message will be sent to your chat from your account.
You can close the instruction.
I'm advanced, can I run through Docker?
docker run qwskr/wedne:latest
I'm advanced, can I run a server?
It's easiest to clone and run using Docker Compose:
docker compose up
Without docker, you need to run the API and task handler:
python -m wedne.server run_api
python -m wedne.server consume_tasks
FAQ
Why do I have to log into Telegram? Is it safe?
wedne has to send a letter to chat from some account. When you log in, such an account is connected. The source code is open, you can check for yourself how the Telegram data is used.
Can I do it without the Telegram?
You can't.
Still anxious, how can I run the code from source?
- Clone the repository (
git clone https://github.com/igoose1/wedne
), - Install poetry (
pip install poetry
), - Go to the source and install dependencies (
cd wedne; poetry install
), - Run wedne (
python -m wedne
).
What commands can be sent from the server?
Only a command with three variables: what letter to send, when to send it and after whom
to send it. The server cannot send a command to send a word or a phrase. The client will
not accept such a command. The server can't redirect clients to another chat. Chat ID is
stored locally on clients. Command scheme: wedne/commands.py
Can't get it to run, help?
Ask for a help in the "Бар" chat.
I don't understand anything, what are the towers and what is the club?
You don't seem to know about the Vas3k Club. This project is written for it. If you are not a member, wedne will be of no use to you.
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.