Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/daskol/typst-telegram-bot
Render math expression with typst markup language in Telegram
https://github.com/daskol/typst-telegram-bot
telegram-bot typst typst-bot typst-telegram-bot
Last synced: 28 days ago
JSON representation
Render math expression with typst markup language in Telegram
- Host: GitHub
- URL: https://github.com/daskol/typst-telegram-bot
- Owner: daskol
- License: mit
- Created: 2023-04-04T23:30:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-13T09:56:48.000Z (5 months ago)
- Last Synced: 2024-08-02T06:14:35.999Z (3 months ago)
- Topics: telegram-bot, typst, typst-bot, typst-telegram-bot
- Language: Python
- Homepage: https://t.me/TypstBot
- Size: 36.1 KB
- Stars: 5
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-typst - typst-telegram-bot - A plain and simple HTTP API for rendering math with Typst. (Integrations & Tools / Typst As A Service)
README
# Typst Telegram Bot
*Render math expression with typst markup language in Telegram*
## Overview
Try [@TypstBot][1] in Telegram or deploy as follows. First, run simple HTTP API
to `typst`. It uses `typst` for rendering `*.typ` to `*.png`.```shell
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.```shell
typst-telegram serve bot --endpoint http://localhost:8080
```[1]: https://t.me/TypstBot
## Deployment
Currently, deployment is based on Compose plugin but deployment requires some
preparation. We need to create directory `data` and properly assign ownership.```shell
mkdir data
chown -R nobody:nobody data
```Finally, one can run services as follows.
```shell
docker compose up -d
```