[IPython-dev] Making custom converter/template with nbconvert

Thomas Kluyver takowl at gmail.com
Tue Dec 16 17:13:29 EST 2014


Hi Rafał,

On 16 December 2014 at 13:40, Rafał Skolasiński <rjtskolasinski at gmail.com>
wrote:

> Unfortunately each unit must go into separate html file and here comes my
> first question: what is the easiest way to force nbconverter to export one
> notebook into few html files (let's say Heading 1 will start every unit and
> at the same time will be the name of it)?


I think you will need to make a custom exporter - nbconvert supports
different output formats with exporter classes, which you can find here:
https://github.com/ipython/ipython/tree/master/IPython/nbconvert/exporters

Your case will be a bit trickier than most of those examples, because all
the TemplateExporter subclasses assume that they are writing a single main
output file. But there's no reason that an exporter class couldn't write
several files from one notebook.

Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20141216/8a2b1082/attachment.html>


More information about the IPython-dev mailing list