html.py
41 lines
| 1.4 KiB
| text/x-python
|
PythonLexer
Jonathan Frederic
|
r10624 | """TODO: Docstring | |
Jonathan Frederic
|
r10588 | """ | |
#----------------------------------------------------------------------------- | |||
# Copyright (c) 2013, the IPython Development Team. | |||
# | |||
# Distributed under the terms of the Modified BSD License. | |||
# | |||
# The full license is in the file COPYING.txt, distributed with this software. | |||
#----------------------------------------------------------------------------- | |||
#----------------------------------------------------------------------------- | |||
# Imports | |||
#----------------------------------------------------------------------------- | |||
# local import | |||
import exporter | |||
Jonathan Frederic
|
r10626 | import nbconvert.transformers.csshtmlheader | |
Jonathan Frederic
|
r10624 | from IPython.utils.traitlets import Unicode | |
Jonathan Frederic
|
r10588 | ||
#----------------------------------------------------------------------------- | |||
# Classes | |||
#----------------------------------------------------------------------------- | |||
class HtmlExporter(exporter.Exporter): | |||
Jonathan Frederic
|
r10624 | file_extension = Unicode( | |
'html', config=True, | |||
help="Extension of the file that should be written to disk" | |||
) | |||
template_file = Unicode( | |||
'fullhtml', config=True, | |||
help="Name of the template file to use") | |||
Jonathan Frederic
|
r10588 | ||
def _register_transformers(self): | |||
#Register the transformers of the base class. | |||
Jonathan Frederic
|
r10630 | super(HtmlExporter, self)._register_transformers() | |
Jonathan Frederic
|
r10588 | ||
#Register latex transformer | |||
Jonathan Frederic
|
r10626 | self.register_transformer(nbconvert.transformers.csshtmlheader.CSSHtmlHeaderTransformer) | |
Jonathan Frederic
|
r10588 |