Script for sending files via Telegram Bot, can be used for backup (for example with cron).
Install requirements:
pip install -r requirements.txtCreate environment file (.env) with the following variables:
BOT_TOKEN='<your Telegram Bot token>'
CHAT_ID='<your chat id>'usage: tgb.py [-h] [-e ENV_PATH] FILE [FILE ...]
Can send any file(s) via Telegram Bot
positional arguments:
FILE Path(s) to target file(s)
options:
-h, --help show this help message and exit
-e ENV_PATH, --env-path ENV_PATH
Path to configuration environment file (default: .env)
python tgb.py image.jpg text.txt archive.zip database.db -e config.env