Skip to main content

Set of Pandoc filters to aid in literate programming

Project description

Test Badge codecov

Entangled - Pandoc filters

This contains several Pandoc filters and scripts for literate programming in Markdown. These filters are enough to get you going with literate programming.

Install

pip install .

Testing

pip install -e .[test]
pytest

Supported syntax

See the project homepage for more info.

Named code blocks

``` {.python #hello}
print("Hello, World!")
```

Reference code blocks

``` {.python #main}
def main():
    <<hello>>
```

Define files

``` {.python file=hello.py}
<<main>>

if __name__ == "__main__":
    main()
```

Documentation tests

``` {.python .doctest #the-question}
6*7
---
42
```

pandoc-tangle

Extracts code blocks and writes them to files.

pandoc -t plain --filter pandoc-tangle hello.md

pandoc-test

Runs doctests, and include results into output.

pandoc -t html5 -s --filter pandoc-test hello.md

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

entangled-filters-0.4.tar.gz (6.7 kB view details)

Uploaded Source

File details

Details for the file entangled-filters-0.4.tar.gz.

File metadata

  • Download URL: entangled-filters-0.4.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.5

File hashes

Hashes for entangled-filters-0.4.tar.gz
Algorithm Hash digest
SHA256 c5b5590eabf2ad7feb0ad80cb19e9faa8af4937674ffd564ce56539b86bbc824
MD5 0eb0054b22a78ef19ae4f17fb14279d9
BLAKE2b-256 fd766f6eca149f5d786a0db4955bcb3d906aff176ab086e956c3f9dd1413cbfa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page