A pandoc filter for executing (python) code and including the results.
Project description
pandoc-source-exec
===============
``pandoc-source-exec`` is a `panflute`_ `pandoc`_ `filter`_.
It executes code annotated code blocks with the proper executables and
adds the output below. `Example <example>`__:
::
```{ .python .exec }
print('Hello World')
```
The above can be compiled like this:
.. code-block:: Makefile
main:
pandoc --filter pandoc-source-exec -o example.pdf example.md
The resulting output will include `Hello World` after the code block.
Installation
------------
Just use pip to install it from `pypi`_
.. code-block:: shell
pip install pandoc-code-exec
.. _`filter`: https://pandoc.org/scripting.html
.. _`pandoc`: https://pandoc.org/index.html
.. _`panflute`: http://scorreia.com/software/panflute/index.html
.. _`pypi`: https://pypi.python.org/pypi/pandoc-code-exec
Future
------
- [ ] Execute code other than python
- [ ] Refactor interactive execution, build REPL wrappers.
- [ ] Allow configurable pre- and postfixes for the output
===============
``pandoc-source-exec`` is a `panflute`_ `pandoc`_ `filter`_.
It executes code annotated code blocks with the proper executables and
adds the output below. `Example <example>`__:
::
```{ .python .exec }
print('Hello World')
```
The above can be compiled like this:
.. code-block:: Makefile
main:
pandoc --filter pandoc-source-exec -o example.pdf example.md
The resulting output will include `Hello World` after the code block.
Installation
------------
Just use pip to install it from `pypi`_
.. code-block:: shell
pip install pandoc-code-exec
.. _`filter`: https://pandoc.org/scripting.html
.. _`pandoc`: https://pandoc.org/index.html
.. _`panflute`: http://scorreia.com/software/panflute/index.html
.. _`pypi`: https://pypi.python.org/pypi/pandoc-code-exec
Future
------
- [ ] Execute code other than python
- [ ] Refactor interactive execution, build REPL wrappers.
- [ ] Allow configurable pre- and postfixes for the output
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pandoc-source-exec-0.1.1.tar.gz.
File metadata
- Download URL: pandoc-source-exec-0.1.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c08d6da11f011d2c6d9e67f456c33d61cb89aa2e495f07ec141224f6ce156c94
|
|
| MD5 |
214ed8b2e4153e5a877ef85c0d47969b
|
|
| BLAKE2b-256 |
0d92926858fa86c275f1f758413555227423b5e9ceb0ba86d502040510f5978a
|