Software | Version |
---|---|
Python | 3.12.2 |
pip | 23.3.1 |
Docker | 20.10.5 |
LibreOffice | 7.0.4.2 |
The bot is a very simple tool made to aid a simple and hassle-free conversion
of any type of libreoffice
supported document into a .pdf
file (without having to go through a sketchy website)
My bot is currently deployed on my remote server, you can try it if you'd like
In order to run the bot functionality locally, simply follow the steps listed below
To run the same Telegram bot for youreself, you need to create a Telegram Account
and then register
an app as a Telegram Developer
following this guide
After completing the previous tasks you will endup with an API_ID
and API_HASH
which are tied
to your personal telegram account
Finally register a new Telegram Bot
via the Bot Father, after which
you will obtain the BOT_TOKEN
- Clone the git repository and change into the repository's directory
git clone https://github.com/AndrewDarnall/Universal-Converter-Bot.git
cd Universal-Converter-Bot
- Populate the variables within the
./scripts/envs_setup.sh
script with your personalAPI_ID
,API_HASH
andBOT_TOKEN
values, and run the following script
bash ./scripts/envs_setup.sh "your_API_ID" "your_API_HASH" "your_BOT_TOKEN"
- Build the docker container from the
Dockerfile
docker build -t converter-bot-py .
- Run the docker container, which will in turn run the Telegram Bot and accept messages sent to it
docker run -d -e API_ID=$API_ID -e API_HASH=$API_HASH -e BOT_TOKEN=$BOT_TOKEN --name converter_bot_py converter-bot-py
- Open a
Telegram Client
of choice and begin a chat with your telegram bot, after which you will be able to send any document you wich, as long as it is smaller than2GB
and it will return a converted file into.pdf
format, as long aslibreoffice
supports said conversion