ChanMo / docker-pandoc

docker pandoc api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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
  • epub

Visit https://pandoc.org/, and get more help.

About

docker pandoc api

License:MIT License


Languages

Language:Python 85.1%Language:Dockerfile 14.9%