[IPython-dev] No code in the exported HTML

Matthias BUSSONNIER bussonniermatthias at gmail.com
Mon Jul 22 02:39:14 EDT 2013


Hi Lee, 

IPython 1.0.alpha has beed released a few hours ago, 
This means that you can try it and report bug if you wish, but be carefull, it is still an alpha. 

there are not a lot of doc available for now in nbconvert, but what I would suggest is to write a
simple template that inherit full_html and overwrite the "block input" to be empty, like so

{%- extends 'fullhtml.tpl' -%}

{% block input %}
{%- endblock input %}


You should be able to use the 2 following option to tell nbconvert to use your template

FullHTMLExporter.template_file=<Unicode>

I'm not sure there is a CL flag to tell nbconvert where to search theses templates, so you might ave to put your template in IPython installation directory for now or use the Programatic API. 
--
Matthias


Le 21 juil. 2013 à 22:37, Lee Chaplin a écrit :

> Hi all,
> 
> I am a bit lost here, any help will be very appreciated.
> I would like to save a static HTML page from an IPy Notebook containing no code, and no "In [1]:" or "Out [1]:" divs.
> In other words, I would like that the resulted page to contain no traces of python/ipython code, so leaving only the comments, texts, images, latex in place.
> I reckon one option would be to eliminate by hand the HTML divs that contain the code - or by XSLT. The second option seems be to use nbconvert - and I don't know yet how to use it.
> 
> Any idea what is the simplest/straight forward way to achieve this?
> 
> Thank you,
> Lee
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev




More information about the IPython-dev mailing list