A literate programming framework for ActivePapers
Konrad Hinsen · Zenodo (CERN European Organization for Nuclear Research) · 2016
The approach taken is very simple: a literate module or calclet is simply Python code with comment sections written in Markdown. In the generated documentation, the comment sections become uncommented Markdown, and the Python code is transformed to Markdown code blocks. There are also a few commands for including text blocks, data, and images from the documentation section of an ActivePaper. For a usage example, see code/python-packages/example_module code/example_calclet code/generate_report To use this framework in your own ActivePapers, link code/python-packages/literate_python into it. Then write a calclet similar to generate_report for generating a complete documentation of your work in Markdown format. You can then use pandoc to generate documentation in other formats.