daskol / typst-telegram-bot

Render math expression with typst markup language in Telegram

Home Page:https://t.me/TypstBot

Repository from Github https://github.comdaskol/typst-telegram-botRepository from Github https://github.comdaskol/typst-telegram-bot

Typst Telegram Bot

Render math expression with typst markup language in Telegram

Overview

Try @TypstBot in Telegram or deploy as follows. First, run simple HTTP API to typst. It uses typst for rendering *.typ to *.png.

typst-telegram serve api \
    --root-dir data \
    --endpoint http://localhost:8080 \
    --interface 127.0.0.1

Finally, one can run Telegram bot itself as follows with environemnt variable TELEGRAM_BOT_TOKEN set.

typst-telegram serve bot --endpoint http://localhost:8080

Deployment

Currently, deployment is based on Compose plugin but deployment requires some preparation. We need to create directory data and properly assign ownership.

mkdir data
chown -R nobody:nobody data

Finally, one can run services as follows.

docker compose up -d

About

Render math expression with typst markup language in Telegram

https://t.me/TypstBot

License:MIT License


Languages

Language:Python 94.6%Language:Dockerfile 5.4%