uploader-bot/README.md

41 lines
988 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Sanic Telegram Bot [template]
Полная документация по системе (архитектура, протоколы, конфигурация, диаграммы) — см. `ARCHITECTURE.md`.
### Запуск тестов интеграции DHT
```shell
cd uploader-bot
python3 -m unittest discover -s tests/dht
```
---
## Run
```shell
cd sanic-telegram-bot
# edit .env file
# build media_converter git.projscale.dev/my-dev/converter-module
docker-compose up --build
```
---
## Translations
### Adding new language
1. Update translations keys list from code
```shell
touch messages.pot
find app -name '*.py' -exec xgettext --keyword=translated -j -o messages.pot {} +
```
2. Move `messages.pot` to `locale/<lang>/LC_MESSAGES/<domain>.po`
3. Compil[requirements.txt](requirements.txt)e `.po` to `.mo`
```shell
msgfmt ru.po -o ru.mo
```
---
## Log description
### Sources
1. [SQL] MariaDB
2. [User, options \] User log
3. [Bot, options \] Telegram bot