0

I wanted to use PyPandoc as a service (In Docker container).

I installed "docker pull msabramo/pypandoc".
It creates an image but I don't know how to use it (input to Docker container and get output).
What am I supposed to type from there?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

You would need to follow the instruction from hub.docker.com/r/msabramo/pypandoc/

docker run -v `pwd`:/source -it msabramo/pypandoc

That opens a bash session, in which you have your project in /source (mounted from your current host folder pwd)

You can then type:

import pypandoc
output = pypandoc.convert('somefile.md', 'rst')
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks for your reply. Actually, I wanted to run like this... [link](https://github.com/mrded/pandoc-as-a-service) curl -H "Content-Type: text/markdown" -X POST -d "# hello" http://localhost/html – user7429130 Dec 20 '17 at 04:05
  • @user7429130 OK... then what is the issue? – VonC Dec 20 '17 at 07:39