From 3a8f3235633944522cc3675b222932bd56f5654e Mon Sep 17 00:00:00 2001 From: Skipper Seabold Date: Sat, 16 Nov 2013 16:46:09 +0000 Subject: [PATCH 1/2] DOC: nbconvert no longer necessary --- liquid_tags/Readme.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/liquid_tags/Readme.md b/liquid_tags/Readme.md index 8f25e34..e1591f1 100644 --- a/liquid_tags/Readme.md +++ b/liquid_tags/Readme.md @@ -80,13 +80,7 @@ config file: Because the conversion and rendering of notebooks is rather involved, there are a few extra steps required for this plugin: -- First, the plugin requires that the nbconvert package [1]_ to be in the - python path. For example, in bash, this can be set via - - >$ export PYTHONPATH=/path/to/nbconvert/ - - The nbconvert package is still in development, so we recommend using the - most recent version. +- First, you will need to install IPython >= 1.0 [1]_ - After typing "make html" when using the notebook tag, a file called ``_nb_header.html`` will be produced in the main directory. The content @@ -104,4 +98,4 @@ are a few extra steps required for this plugin: this will insert the proper css formatting into your document. -[1] https://github.com/ipython/nbconvert +[1] http://ipython.org/ From ce58bd5704bc4db6f589ffe8bc726d42aedb2dc1 Mon Sep 17 00:00:00 2001 From: Skipper Seabold Date: Sat, 16 Nov 2013 16:53:25 +0000 Subject: [PATCH 2/2] Fix error message for IPython 2.0 --- liquid_tags/notebook.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/liquid_tags/notebook.py b/liquid_tags/notebook.py index 0728999..8b45d5d 100644 --- a/liquid_tags/notebook.py +++ b/liquid_tags/notebook.py @@ -48,8 +48,9 @@ import re import os from .mdx_liquid_tags import LiquidTags +from distutils.version import LooseVersion import IPython -if IPython.__version__.split('.')[0] != '1': +if not LooseVersion(IPython.__version__) >= '1.0': raise ValueError("IPython version 1.0+ required for notebook tag") from IPython import nbconvert @@ -166,16 +167,16 @@ class SubCell(Transformer): nbc = deepcopy(nb) for worksheet in nbc.worksheets : cells = worksheet.cells[:] - worksheet.cells = cells[self.start:self.end] + worksheet.cells = cells[self.start:self.end] return nbc, resources #---------------------------------------------------------------------- # Customize the html template: # This changes the
 tags in basic_html.tpl to