跳转到主要内容

ipython笔记本链接生成脚本

项目描述

示例

# 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

用法 - 编辑gists

编辑gists的工作方式如下: * 任何使用 -e 标志标记的文件将添加到gists中,除非该文件名已存在于gists中,在这种情况下,它将用当前文件的当前内容覆盖

用法 - ipython笔记本

ipython笔记本是具有 .ipynb 扩展名的文件。如果命令行上指定的所有文件都具有此扩展名,则将生成到 http://nbviewer.ipython.org 的链接以显示您的gists。nbviewer不会永久存储您的gists数据,但会将其缓存大约10分钟

安装

pip install notebook-viewer 或克隆存储库并 python setup.py install

gister 是必需的,因此您可能需要查看配置,不必担心,它将正常工作,但所有内容都将匿名创建

如果您收到 InsecurePlatformWarning,请通过 pip install requests[security] 来解决它。我必须在我的 fedora 21 系统上安装 libffi-devel 才能让 pyOpenSSL 工作正常

README.rst

README.rst 文档是从 README.md 使用 pandoc 生成的。它相当不错

sudo dnf install pandoc
pandoc README.md -s -o README.rst

项目详情


下载文件

下载适合您平台的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

notebook-viewer-1.0.1.tar.gz (7.3 kB 查看散列值)

上传时间

支持