ChaikaBogdan / memes2telegram

Simple bot which converts GIF, WEBM, MP4 to properly encoded for Telegram MP4
MIT License
5 stars 0 forks source link

memes2telegram

CodeQL Tests

Simple Telegram chat bot that downloads GIF, WEBM, and MP4 by URL and sends them back as properly encoded Telegram MP4 videos.

Your bot should be added to a group as an admin (otherwise you should disable privacy mode for it).

How to use

> @memes2telegram https://img-9gag-fun.9cache.com/photo/ID.webm

How to run

pip install poetry
poetry install --no-root
poetry run python main.py

Docker

You will need supply absolute path to project on mounting the volume

docker build -t memes2telegram .
docker run -v d:/memes2telegram:/bot --name memes2telegram -d memes2telegram
# docker run -v d:/memes2telegram:/bot -e BOT_TOKEN=XXX --name memes2telegram -d memes2telegram run python main.py
# docker run --rm -v d:/memes2telegram:/bot memes2telegram lock
# docker run --rm -v d:/memes2telegram:/bot memes2telegram add httpx
# docker run --rm -v d:/memes2telegram:/bot memes2telegram add -G dev pytest_httpx
# docker run --rm -v d:/memes2telegram:/bot memes2telegram run ruff check --output-format=github .
# docker run --rm -v d:/memes2telegram:/bot memes2telegram run pytest -n auto

Supported memes:

Supported commands: