Profile manager of text processing pipelines: Pandoc filters, any text CLI filters. Atom+Markdown+Pandoc+Jupyter workflow, export to ipynb. Uses Stitch fork: https://github.com/kiwi0fruit/knitty
MIT License
Pandoctools is a combination of tools that help write reproducible markdown reports. They rely on Pandoc and Jupyter kernels.
Introduction articles:
“Glueing” part of pandoctools is a profile manager of text processing pipelines. It stores short crossplatform bash scripts that define chain operations over text. They are mostly Pandoc filters but any CLI text filter is OK.
(Update instructions to v.2.8.0.2)
$mathjax
var changed meaning, ${mathjax_url}
and ${extra_inputs}
were removed. But profiles can be easily fixed. Uninstall Pandoctools before updating. Update your custom bash scripts as names and logic changed. References: Default_args, Default (profile), Default_pipe,--pipe
arg to pandoc-crossref (see this for details),Pandoctools is a tool for converting markdown document. But we also need tools for writing markdown and deploying python/Jupyter code blocks. And the best one for it is:
NEW: see automatically generated examples documents (by Travis CI) of the latest Pandoctools version in CI Artifacts (generated on Windows, macOS and Ubuntu).
Here are examples that demonstrate converting documents:
.md
with Jupyter python code blocks, SugarTeX math and cross-references to .ipynb
notebook and to PDF..py
with Atom/Hydrogen code cells, Knitty markdown incerts (again with SugarTeX math and cross-references) to .ipynb
notebook and to PDF.Examples are given for to .ipynb and to .pdf conversion but Pandoctools surely capable of conversion to .html, .md.md or any Pandoc output format.
Extras:
<!-- html comments -->
for adding notes, pigments for highlighting text.conda env create --file pandoctools_env.yaml
Windows notice!
win_bash
value in the %APPDATA%\pandoc\pandoctools\Defaults.ini
(after it was autocreated by pandoctools-ready
). You can also install conda packages with bash to the environment with pandoctools: either conda-forge::git
or pkgs/msys2::posix
.Linux notice!
If on Ubuntu additionally install (Chrome headless doesn't launch on Unix):
sudo apt-get update
sudo apt-get install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils
macOS notice!
If on macOS 10.13 you should use "py-pandoc-crossref<0.3.6.3"
. You can modify CLI command into pandoctools "py-pandoc-crossref<0.3.6.3"
or istall additionally after the main installation (conda install -c defaults -c conda-forge xxx
or pip install xxx
). That is the latest version that supports both panflute and macOS 10.13 (though it has this bug).
conda install -c defaults -c conda-forge pandoctools
pip install pandoctools
pandoctools-ready
root_env
in the config):cd $root_miniconda_prefix
source ./bin/activate base
conda config --add channels conda-forge
conda config --add channels defaults
conda update conda
conda create -n pandoctools pandoctools
source activate pandoctools
pandoctools-ready
(on Windows):
cd /d %root_miniconda_prefix%
call .\Scripts\activate base
conda config --add channels conda-forge
conda config --add channels defaults
conda update conda
conda create -n pandoctools pandoctools
call activate pandoctools
pandoctools-ready
conda remove -n myenv --all
conda env remove -n myenv
(in this particular order)cd $root_python_prefix
./bin/python -m venv ./envs/pandoctools
source ./envs/pandoctools/bin/activate
pip install pandoctools
pandoctools-ready
(on Windows):
cd /d %root_python_prefix%
.\python -m venv .\envs\pandoctools
call .\envs\pandoctools\Scripts\activate
pip install pandoctools
pandoctools-ready