Gamazic / random-recipes-bot

Telegram bot for indecisive people who can't choose what to cook.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RandomRecipesBot

Build

Initially, the bot was created by me for personal purposes. When I didn't know what to cook, I took a random recipe from notes. Then I decided to make this bot for these purposes. But you can use it as a bag in which you can put any items and endlessly pull out recipes without repeating.

Bot link

https://t.me/RandomRecipesBot

Preview

Preview

About project

How to manual start localy

Requirements

  • Python 3.9
  • poetry
  • .env file with following variables:
    MONGO_ROOT_PASSWORD
    MONGO_ROOT_USERNAME
    MONGO_USER
    MONGO_PASSWORD
    MONGO_HOST
    MONGO_PORT
    MONGO_RECIPE_DB
    TG_TOKEN
    WEBHOOK_HOST
    WEBHOOK_PATH
    WEBHOOK_PORT
    WEBAPP_HOST
    WEBAPP_PORT
    

Install dependencies

To install all dependencies use command:

poetry install -n

You can learn more about poetry here:

  • Russian 1
  • English 2

To install without dev dependenices (for run project only without tests and linters) use following command:

poetry install -n --no-dev

Run app with polling

poetry run python server.py -e polling

Run tests

poetry run pytest -v

Testing can be run only with dev dependecies

Start localy via docker-compose

At first you need to install docker-compose. How to do this you can read here:

  • Russian 3, 4.
  • English 5, 6.

After installing docker-compose you need to run the following command:

docker-compose up -d

Useful links

More guides in README comming soon.

Footnotes

  1. Обзор poetry от Диджитализируй!: https://youtu.be/KOC0Gbo_0HY

  2. poetry official documentation: https://python-poetry.org/docs/

  3. Установка Docker для Ubuntu 18.04: https://www.digitalocean.com/community/tutorials/docker-ubuntu-18-04-1-ru

  4. Установка docker-compose для Ubuntu 18.04: https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04-ru

  5. Install Docker: https://docs.docker.com/engine/install/

  6. Install docker-compose: https://docs.docker.com/compose/install/

About

Telegram bot for indecisive people who can't choose what to cook.


Languages

Language:Python 96.8%Language:Dockerfile 3.2%