<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Will comment more later:</div><div><br></div><div>Yes interested, a lot. Don't use HTML full, use 'basic' it will give you only the inner body. </div><div><br></div><div>We have 2 CSS one of which should not conflict. Feedback welcomed.<br><br>Envoyé de mon iPhone</div><div><br>Le 29 oct. 2013 à 11:16, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> a écrit :<br><br></div><blockquote type="cite"><div><style>body {
        font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        padding:1em;
        margin:auto;
        background:#fefefe;
}

h1, h2, h3, h4, h5, h6 {
        font-weight: bold;
}

h1 {
        color: #000000;
        font-size: 28pt;
}

h2 {
        border-bottom: 1px solid #CCCCCC;
        color: #000000;
        font-size: 24px;
}

h3 {
        font-size: 18px;
}

h4 {
        font-size: 16px;
}

h5 {
        font-size: 14px;
}

h6 {
        color: #777777;
        background-color: inherit;
        font-size: 14px;
}

hr {
        height: 0.2em;
        border: 0;
        color: #CCCCCC;
        background-color: #CCCCCC;
}

p, blockquote, ul, ol, dl, li, table, pre {
        margin: 15px 0;
}

a, a:visited {
        color: #4183C4;
        background-color: inherit;
        text-decoration: none;
}

#message {
        border-radius: 6px;
        border: 1px solid #ccc;
        display:block;
        width:100%;
        height:60px;
        margin:6px 0px;
}

button, #ws {
        font-size: 12 pt;
        padding: 4px 6px;
        border-radius: 5px;
        border: 1px solid #bbb;
        background-color: #eee;
}

code, pre, #ws, #message {
        font-family: Monaco;
        font-size: 10pt;
        border-radius: 3px;
        background-color: #F8F8F8;
        color: inherit;
}

code {
        border: 1px solid #EAEAEA;
        margin: 0 2px;
        padding: 0 5px;
}

pre {
        border: 1px solid #CCCCCC;
        overflow: auto;
        padding: 4px 8px;
}

pre > code {
        border: 0;
        margin: 0;
        padding: 0;
}

#ws { background-color: #f8f8f8; }

.send { color:#77bb77; }
.server { color:#7799bb; }
.error { color:#AA0000; }</style><p>Quick update on this.  I managed to create the <code>notebook</code> extension I was asking about in my initial message to the list.  I did end up using <code>runipy</code>, as Matthias suggested.</p>

<p>Much of hard work for the extension was originally done by Anthony Scopatz, who wrote a similar notebook sphinx plugin for <code>pyne</code> (<a href="http://pynesim.org/">http://pynesim.org/</a>) based on evaluated notebooks.</p>

<p>Using Anthony's extension, I generalized it to evaluate and embed the notebook in our docs.  As a proof-of-concept, I transferred the yt bootcamp, which we had displayed in the past using static nbviewer links, to use the new <code>notebook</code> directive.</p>

<p>The result is here: <a href="http://ngoldbaum.net/docs_build/bootcamp/index.html">http://ngoldbaum.net/docs_build/bootcamp/index.html</a></p>

<p>If you're interested in the details of how this works, the code for the plugin is <a href="https://bitbucket.org/ngoldbaum/yt-doc/src/tip/extensions/notebook_sphinxext.py">here</a>.  One issue is that I had to monkeypatch the CSS I got back from nbconvert to avoid mangling our docs theme.</p>

<p>I've also created a similar <code>notebook-cell</code> extension that transforms inline .rst code snippets into evaluated notebook cells in the docs build.</p>

<p>For now these extensions are part of the yt documentation, but if there's interest I'll happily package up the extensions and do a standalone release for them.</p>

<p>-Nathan</p>

<p>On October 23, 2013 at 1:13:08 AM, Matthias Bussonnier (<a href="mailto:bussonniermatthias@gmail.com">bussonniermatthias@gmail.com</a>) wrote:</p>

<p>Hi</p>

<p>I'm not aware of such a plugin.
Definitively interested as we want our doc as notebook in IPython too.</p>

<p>Have a look at runipy (Google is your friend, and is on pypi iirc). It runs notebook headless and generate static HTML from that.  
Having a nbconvert preprocessor that run notebook would also be great!</p>

<h2 id="sorrynodirectlinkfrommyphone">(Sorry no direct link, from my phone)</h2>

<p>M</p>

<p>Envoyé de mon iPhone</p>

<blockquote>
  <p>Le 23 oct. 2013 à 02:41, Nathan Goldbaum <a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a> a écrit :</p>
   
  <p>Hi all,</p>
   
  <p>Myself and some of the other yt devs are thinking about ways to improve cookbook section of our documentation by replacing the scripts we currently host with notebooks.</p>
   
  <p>Since some of our cookbook recipes store plots, we'd like to track these notebooks in version control in an unevaluated state, mainly to avoid versioning images. We have a CI server that already builds our cookbook recipes for our dev docs, so something that integrates with sphinx seems to be the way to go. I think I could write a sphinx plugin that does the job, but it would need to use whatever machinery IPython uses when notebook cells get evaluated. </p>
   
  <p>Does anyone know if such a plugin is available somewhere? If not, does anyone know where I should look in the IPython codebase for when I try to write it myself?</p>
   
  <p>Thanks for your help,</p>
   
  <p>-Nathan</p>
   
  <hr>
   
  <p>IPython-dev mailing list
  <a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a>
  <a href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a></p>
</blockquote>

<hr>

<p>IPython-dev mailing list
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev">http://mail.scipy.org/mailman/listinfo/ipython-dev</a></p></div></blockquote></body></html>