[IPython-dev] Custom template with nbconvert

Jakob Gager gager@ilsb.tuwien.ac...
Fri Aug 9 03:52:31 CDT 2013


Hi,

I tried to create a custom nbconvert template to remove the input cells from a notebook when converting 
the html.
My naive approach was to create a file called my_html.tpl which contains only
{%- extends 'fullhtml.tpl' -%}
{% block input %}
{%- endblock input %}
now I tried to use it as ipython nbconvert --to html --template my_html.tpl file1.ipynb.

However, there seems to be some issue with the registration of the jinja filters as I get an error like

   File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/basichtml.tpl", 
line 56, in <module>
     {{ cell.source | markdown| rm_fake}}
TemplateAssertionError: no filter named 'rm_fake'

Any hints?

Thanks!
Jakob


More information about the IPython-dev mailing list