ipython笔记本链接生成脚本
notebook-viewer的Python项目详细描述
示例
# post a secret gist on github and generate an nbviewer url: nbv # post a secret gist on github anonymously and generate an nbviewer url: nbv -a # edit a gist on github and generate an nbviewer url: nbv -e rfjw48jofwierfjipw nbv -e https://gist.github.com/tr3buchet/rfjw48jofwierfjipw
用法
usage: nbv [-h] [-a] [-e id/url] generate ipynb links! optional arguments: -h, --help show this help message and exit -a, --anonymous gist will be anonymouseven if you have oauth configured -e id/url, --edit id/url edit a gist identified by id or url
用法-编辑注册表
编辑gist的工作原理如下:*任何用-e标记注册的文件 将被添加到要点,除非文件中已经存在一个文件。 在这种情况下,它将被当前文件的 内容
用法-ipython笔记本
ipython笔记本是扩展名为.ipynb的文件。如果所有文件 在命令行中指定的具有此扩展名,指向 http://nbviewer.ipython.org将生成显示要点的url 也。nbviewer不会永久存储gist的数据,但是会 将其缓存约10分钟
安装
pip install notebook-viewer或克隆repo和 python setup.py install
gister是必需的,因此 可能想过来看看,不用担心 将开箱即用,但所有内容都将匿名创建
如果你得到一个InsecurePlatformWarning, pip install requests[security]来解决它。我必须安装 libffi devel在我的fedora 21系统上获得pyopenssl rocking
自述文件。rst
README.rst文档是使用README.md生成的 pandoc。这真是太棒了
sudo dnf install pandoc pandoc README.md -s -o README.rst