Skip to content

Commit

Permalink
docs: add README
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed Jun 29, 2023
1 parent d9ea99f commit 261a8e7
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# tectonic-api


[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![main.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/main.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/main.yml)
[![build.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/build.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/build.yml)
[![warmer.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/warmer.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/warmer.yml)
[![dependabot.yml](https://github.com/winstxnhdw/tectonic-api/actions/workflows/dependabot.yml/badge.svg)](https://github.com/winstxnhdw/tectonic-api/actions/workflows/dependabot.yml)

A simple [axum](https://github.com/tokio-rs/axum) API for compiling TeX/LaTeX with [Tectonic](https://github.com/tectonic-typesetting/tectonic).

## Usage

Simply cURL the endpoint like in the following.

```bash
curl 'https://winstxnhdw-tectonic-api.hf.space/compile' \
-d '{
"latex": "\\documentclass{article}\\begin{document}Hello, world!\\end{document}"
}'
```

## Development

You can spin the server up locally with the following.

```bash
docker build -f Dockerfile.build -t tectonic-api .
docker run --rm -e SERVER_PORT=5000 -p 5000:5000 tectonic-api
```

0 comments on commit 261a8e7

Please sign in to comment.