gutspacebot

Prerequisites

  1. Python version 3.8 or later
  2. pip or pip3
  3. Bot token for VK API

IMPORTANT

Before running this bot you should create Google sheet table and set in A-L columns text "9:00" "10:00" etc.

Build locally

Installing requirements

  1. Clone this repo

    git clone https://github.com/TechDepSut/gutspacebot.git
  2. Create virtual environment

    • For Windows:

      python -m venv .venv
    • For Linux, MacOS:

      python3 -m venv .venv
  3. Activate virtual environment

    • For Windows:

      .\.venv\Scripts\activate
    • For Linux, MacOS:

      source ./.venv/bin/activate
  4. Install requirements

    • For Windows:

      pip install -r requirements.txt
    • For Linux, MacOS:

      pip3 install -r requirements.txt
  5. Setting environment variables

    • For Windows:

      • Powershell:

        $env:token="TOKEN_TO_YOUR_BOT";
        $env:service_file="SERVICE_FILE_FOR_GOOGLE_API";
      • cmd:

        set token=TOKEN_TO_YOUR_BOT
        set service_file="SERVICE_FILE_FOR_GOOGLE_API"
    • For Linux, MacOS:

      • Bash:

        export token="TOKEN_TO_YOUR_BOT"
        export service_file="SERVICE_FILE_FOR_GOOGLE_API"
  6. Run bot

    • For Windows:

      cd .\src\
      python .\bot.py
    • For Linux, MacOS:

      cd ./src/
      python3 bot.py

Build docker

  1. Build Image

    docker build -t gutspace .
  2. Run container

    docker run -it --env service_file="service_file.json" --env token="bot_token" --env TZ=Europe/Moscow gutspace