-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9ea99f
commit 261a8e7
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |