Menu-Bot is a Telegram bot designed to help users generate meal plans and manage recipes. The bot supports adding dishes, organizing them into categories (breakfast, lunch, and dinner), and generating a menu for a specified period.
- Dish Categories: Add dishes under breakfast, lunch, or dinner categories.
- Weighted Selection: Each dish has a weight, increasing its probability of being chosen.
- Menu Generation: Generate a menu for a specified period (e.g., 2 weeks), ensuring variety and accommodating missing dishes with placeholders.
- Multi-User Support: Each user can have their own set of dishes, tied to their Telegram ID.
- Python 3.11
- PostgreSQL
- Poetry
- Install Docker and Docker Compose.
- Ensure Python 3.11 is installed on your local machine.
- Clone this repository:
git clone https://github.com/your-repo/menu-bot.git cd menu-bot
-
Create a
.env
file in the root directory:POSTGRES_USER=your_postgres_user POSTGRES_PASSWORD=your_postgres_password POSTGRES_DB=your_database_name POSTGRES_HOST=postgres POSTGRES_PORT=5432 TELEGRAM_BOT_TOKEN=your_telegram_bot_token
-
Update
pyproject.toml
with any additional dependencies.
docker-compose up --build -d
-
Install dependencies:
poetry install
-
Set up the database:
poetry run alembic upgrade head
-
Run the bot:
poetry run python main.py