https://github.com/chanmo/docker-pandoc
docker pandoc api
https://github.com/chanmo/docker-pandoc
docker-pandoc pandoc pandoc-api
Last synced: about 2 months ago
JSON representation
docker pandoc api
- Host: GitHub
- URL: https://github.com/chanmo/docker-pandoc
- Owner: ChanMo
- License: mit
- Created: 2023-03-14T01:28:51.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-07T03:16:01.000Z (over 1 year ago)
- Last Synced: 2025-03-05T17:49:13.769Z (3 months ago)
- Topics: docker-pandoc, pandoc, pandoc-api
- Language: Python
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Pandoc Convert API
Notice: There is no support for converting to PDF format.
For more tools to help you manage and use your documents, visit [Awesome Document](https://www.chanmo.me/awesome_document.html)
## Usage
Start the API server
```
docker run --rm -p 5000:5000 chanmo/pandoc
```Convert the DOCX file to HTML format, by httpie
```
http -f POST :5000/convert/html file@~/demo.docx
```Result:
```
{
"media": [],
"output": "/uploads/c2528467-3050-4d20-b5be-192fc273c86e.html",
"success": true
}
```Then, you can download the HTML file from the output value.
If you want the API to return the binary data directly, you can add the `download=true`:
```
http -f POST :5000/convert/html?download=true file@~/demo.docx -o demo.html
```## APIs
```
/convert/{format}
```The formats that is supported:
* xml
* html
* markdown
* org
* epubVisit https://pandoc.org/, and get more help.