A python bot project capable of searching for presentations on disk, finding tagged slides in them, sending fonts to slides and presentations, and retrieving all fonts from the folder where the user is located
- Clone the repository using
git clone - Create a virtual environment near the repository folder using
pyenv install 3.10.12
pyenv virtualenv 3.10.12 myenv_3_10
- Activate the virtual environment
pyenv activate myenv_3_10
- Download the libraries
pip install -r TGDesignBot/requirements.txt
- Create a docker container:
- Create a folder with the
docker-compose.ymlfile in it - Insert the following text into it:
version: "3.9" services: postgres: image: postgres:latest environment: POSTGRES_DB: "postgres" POSTGRES_USER: "postgres" POSTGRES_PASSWORD: "postgres" PGDATA: "/var/lib/postgresql/data/pgdata" volumes: - ./data:/var/lib/postgresql/data ports: - "5432:5432"
- Activate container using
docker-compose up --build -d - Create a folder with the
- In the
TGDesignBotfolder:- Create file
.env - Set the access
chmod 600 .env- In
.envadd strings
Replace 'YOUR_BOT_TOKEN' with your bot token. Replace 'YOUR_YDISK_TOKEN' with your yandex disk token.BOT_TOKEN = 'YOUR_BOT_TOKEN' YANDEX_DISK_TOKEN = 'YOUR_YDISK_TOKEN' - Create file
- Complied! You can run
main.py
The bot currently consists of 6 folders, each of which performs a different function
Here you can find scripts for interacting with the database and its initialization
Everything for parsing slides is here
Everything for the telegram bot to work. It is in this part that various functions from the project are used, keyboards, different handlers.
The folder tree that the user navigates through
Various functions that use more complex logic
It is used to work with yadisk and its parsing