[IPython-dev] html notebook converter

Brian Granger ellisonbg@gmail....
Thu Apr 26 00:43:27 CDT 2012


On Wed, Apr 25, 2012 at 10:38 PM, Fernando Perez <fperez.net@gmail.com> wrote:
> Hi Damian,
>
> On Wed, Apr 25, 2012 at 7:05 PM, Damián Avila <damianavila@gmail.com> wrote:
>> I have been reading the notebook converter script posted in github.
>> Searching for tools to a better conversion from rst to html, i have
>> found a static site generator called Nikola (developed from a guy in my
>> country).
>> So, I taked some code... I make some changes... and you can see the
>> result here: http://damian.staticloud.com
>
> great, thanks for diving into this!  It actually looks very nice,
> though I'm curious: why not use sphinx?  While it will be great to
> allow people to plug in their own converters, I think that given how
> so much of the python world uses sphinx, that would be a good target
> to consider.  Additionally, sphinx produces high-quality pdf via
> latex, which is another reason why good sphinx support is worthwhile.
>
> When considering this problem, I'd thought that we'd probably offer
> out of the box a basic html export using only docutils, and a richer
> one using sphinx.  How does that sound to you?

Our basic HTML exporter should simply use something like jinja and
should not go through reST as an intermediary format.  This will
enable us to write the HTML using the same css classes the actual
notebook uses - we will get the right look with very little effort.
We will probably have to tweak the css somewhat because we do some css
tricks in Javascript, but a good bit is covered by our static css
stylesheets.

But I do agree that sphinx writes very nice html and we should
definitely have a writer that goes through that route.  I suppose we
could also support regular docutils, but I don't see as much benefit
in supporting that.

> And in any case, though in the end most people really want html/pdf,
> having the intermediate rst export available as an explicit target is
> always a good idea.  That way, people may decide to only use our
> converter for rst and then plug it into the rest of their worfklow.
>
> But in any case, I'm glad to see you looking into this problem and
> making good progress!
>
> Best,
>
> f
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com


More information about the IPython-dev mailing list