A replacement could be jupyter-book.
This is a port of knitr (http://yihui.name/knitr/) and rmarkdown (http://rmarkdown.rstudio.com/) to python.
To start with, you can run the example overview document. To
convert to all defined output formats, run knitpy --to="all" -- examples\knitpy_overview.pymd
.
This will produce a html
, docx
and pdf
output (if you have pdflatex
in path). You can
view a markdown rendered and a
html rendered
version of this file. It's not yet as pretty as the knitr version...
For a description of the code format see http://rmarkdown.rstudio.com/ and replace
{r <r style options>}
by {python <python style options>}
and of course use python
code blocks...
It uses the IPython kernel infrastructure to execute code, so all kernels for IPython are (aem... can potentially be) supported.
knitpy filename.pymd
will convert filename filename.pymd
to the default output format html
.html
, pdf
and docx
. Change with --to=<format>
--to=all
will convert to all export formats specified in the yaml headereval
, results
(apart form "hold"), include
and echo
_repr_html_()
or
_repr_markdown_()
. Mimetypes not understood by the final output format are automatically
converted via pandoc.knitpy --init --profile-dir=.
import knitpy; knitpy.render(filename.pymd, output="html")
will convert filename.pymd
to filename.html
. output=all
will convert to all document types (as specified in the
YAML header of the document). The call will return a list of converted documents.`--debug
, --kernel-debug=True
, --output-debug=True
#<title>\n<author>\n<date>
before the rest