jupytext将 Jupyter 笔记本转换为纯文本文件,然后再转换回去。 更多信息:https://jupytext.readthedocs.io/en/latest/using-cli.html。
.ipynb/.py 笔记本:jupytext --set-formats ipynb,py {{notebook}}.ipynb
.py 文件:jupytext --to py {{notebook}}.ipynb
.py 文件转换为没有输出的笔记本:jupytext --to notebook {{notebook}}.py
.md 文件转换为笔记本并运行它:jupytext --to notebook --execute {{notebook}}.md
jupytext --update --to notebook {{notebook}}.py
jupytext {{[-s|--sync]}} {{notebook}}.ipynb