Quantcast

[IPython-User] toggle code in ipython notebook

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[IPython-User] toggle code in ipython notebook

rasi
Hi
 I just started using IPython and its notebook version a week back for my data analysis, so excuse me if this is obvious: Is there a way to export the notebook without the code but with everything else (output cells, markdown etc.)? This feature will be useful to send the results of my data analysis to my collaborators who will not necessarily be interested in looking at all the code that I wrote to do the analysis.
Thanks
Rasi

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: toggle code in ipython notebook

MinRK
On Sun, Apr 15, 2012 at 12:20, Arvind Subramaniam <[hidden email]> wrote:
Hi
 I just started using IPython and its notebook version a week back for my data analysis, so excuse me if this is obvious: Is there a way to export the notebook without the code but with everything else (output cells, markdown etc.)? This feature will be useful to send the results of my data analysis to my collaborators who will not necessarily be interested in looking at all the code that I wrote to do the analysis.

No, that's not implemented, but it wouldn't be hard to do.  Do you want the result to still be a notebook, or a separate format altogether?  For a separate output format, you would need to write an exporter that simply skips the `source` element of code cells.

If it should still be a notebook, you can actually hide all inputs by adding a markdown cell to the end of your document, with the contents:

<script type="text/javascript">
    $('div.input').hide();
</script>

To get them back, simply change the cell to use `show()` instead of `hide()`.

-MinRK
 
Thanks
Rasi

_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user



_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: toggle code in ipython notebook

rasi
Thanks for the reply. I wanted to export my output as PDF (or HTML, which I can then send to a printer) without the python code and the IPython 'Ou[xx]:' tags.  Is this possible?
Thanks
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: toggle code in ipython notebook

Fernando Perez
On Sun, Apr 15, 2012 at 2:12 PM, rasi <[hidden email]> wrote:
> Thanks for the reply. I wanted to export my output as PDF (or HTML, which I
> can then send to a printer) without the python code and the IPython
> 'Ou[xx]:' tags.  Is this possible?

Not right now, that really will require writing some conversion code.
We have already started developing the conversion machinery, for now
in a separate repo (it was started during a pycon sprint, so this was
the easiest way to proceed), but it's not finished yet:

https://github.com/ipython/nbconvert

Feel free to jump in and help out!

Cheers,

f
_______________________________________________
IPython-User mailing list
[hidden email]
http://mail.scipy.org/mailman/listinfo/ipython-user
Loading...