专注于快乐的事情

Notebook和Markdown互相转换

Jupyter Notebook导出为MarkDown

命令行方式

实例:

jupyter nbconvert --to markdown 评分卡开发.ipynb --output image/评分卡开发

官方参考

Jupyter Notebook参考MarkDown文件

需要在Jupyter Notebook中修改其他软件编辑的MarkDown的文件,发现可以使用notedown插件解决。

基本步骤

pip3 install https://github.com/mli/notedown/tarball/master

安装完成之后

jupyter notebook --NotebookApp.contents_manager_class='notedown.NotedownContentsManager'

这时打开相应的.md文件就可以了。

不想每次执行都加参数?

操作如下:

执行

jupyter notebook --generate-config

会生成~/.jupyter/jupyter_notebook_config.py文件,在文件中加入配置c.NotebookApp.contents_manager_class = 'notedown.NotedownContentsManager'
再启动jupyter notebook,和上面的效果一样。

评论系统未开启,无法评论!