gpoore / codebraid

Live code in Pandoc Markdown
BSD 3-Clause "New" or "Revised" License
376 stars 13 forks source link

Reading from stdin #33

Closed timothymillar closed 3 years ago

timothymillar commented 4 years ago

It would be useful if codebraid could read directly from stdin. This would allow for piping the output of a pandoc command into codebraid e.g.:

pandoc --filter <filter> --to markdown | codebraid pandoc ...

A common way to implement this in argparse is to use - to specify reading from stdin e.g.:

pandoc --filter <filter> --to markdown | codebraid pandoc - -o result.md
gpoore commented 4 years ago

Thanks for the suggestion! This should work with the last commit. I'll put a new version on PyPI as soon as I address a few other issues.