-
/kek
😎 -
/kek_add
to suggest a reply to be a kek -
/kek_info
to get stats
- Legendary https://github.com/arvego/mm-randbot by Artemy G
- aiogram 3 — a modern asynchronous framework for Telegram Bot API
- Airtable — a cloud platform to store and process spreadsheet data
- Docs: https://airtable.com/developers/web
- Library: https://github.com/gtalarico/pyairtable
- Not async, so used with a Thread Executor to not block the event loop
- Why: to have a visualised editable view of keks with different content types
- Self-hosted alternatives:
https://www.python.org/downloads/
Using poetry
(recommended):
poetry install --no-root
Or by using pip
in a virtual environment (acceptable):
python3.11 -m venv ./venv
source ./venv/bin/activate
pip install -r requirements.txt
Or by using pip
directly (not recommended):
pip3.11 install -r requirements.txt
From the algebrach/app/
folder:
# Set up tokens: copy .env.example to .env and edit it
cp .env.example .env
nano .env
To run:
# Replace `python` with `python3.11` if you didn't create virtual environment
python -u __main__.py
Pre Commit hooks from .pre-commit-config.yaml file:
# To init (required only once)
pre-commit install --install-hooks
# To check hooks before commit
pre-commit run
Black Formatter with settings from pyproject.toml file:
# To format project files
black .
Ruff Linter with settings from pyproject.toml file:
# To detect linter issues and auto fix them where applicable
ruff check --fix .
# To run ruff in a watcher mode to check any file edit
ruff check --fix . --watch
Update to the latest revision:
git pull
Build and start Docker container:
docker-compose up --build -d --force-recreate