From 8be0653eca34e9d7907cdeba17513392890a776b 2013-07-02 18:51:24 From: Matthias Bussonnier Date: 2013-07-02 18:51:24 Subject: [PATCH] Merge pull request #3507 from minrk/html fix HTML capitalization in nbconvert exporter classes --- diff --git a/IPython/nbconvert/exporters/__init__.py b/IPython/nbconvert/exporters/__init__.py index 4bf5af6..004bb32 100755 --- a/IPython/nbconvert/exporters/__init__.py +++ b/IPython/nbconvert/exporters/__init__.py @@ -1,7 +1,7 @@ -from .basichtml import BasicHtmlExporter +from .basichtml import BasicHTMLExporter from .export import * from .exporter import Exporter -from .fullhtml import FullHtmlExporter +from .fullhtml import FullHTMLExporter from .latex import LatexExporter from .markdown import MarkdownExporter from .python import PythonExporter diff --git a/IPython/nbconvert/exporters/basichtml.py b/IPython/nbconvert/exporters/basichtml.py index a9d7d35..1559aaa 100644 --- a/IPython/nbconvert/exporters/basichtml.py +++ b/IPython/nbconvert/exporters/basichtml.py @@ -16,7 +16,7 @@ Exporter that exports Basic HTML. from IPython.utils.traitlets import Unicode -from ..transformers.csshtmlheader import CSSHtmlHeaderTransformer +from ..transformers.csshtmlheader import CSSHTMLHeaderTransformer from .exporter import Exporter @@ -24,7 +24,7 @@ from .exporter import Exporter # Classes #----------------------------------------------------------------------------- -class BasicHtmlExporter(Exporter): +class BasicHTMLExporter(Exporter): """ Exports a basic HTML document. This exporter assists with the export of HTML. Inherit from it if you are writing your own HTML template and need @@ -48,8 +48,8 @@ class BasicHtmlExporter(Exporter): """ #Register the transformers of the base class. - super(BasicHtmlExporter, self)._register_transformers() + super(BasicHTMLExporter, self)._register_transformers() - #Register CSSHtmlHeaderTransformer transformer - self.register_transformer(CSSHtmlHeaderTransformer) + #Register CSSHTMLHeaderTransformer transformer + self.register_transformer(CSSHTMLHeaderTransformer) diff --git a/IPython/nbconvert/exporters/export.py b/IPython/nbconvert/exporters/export.py index 32c7679..68dd3b4 100755 --- a/IPython/nbconvert/exporters/export.py +++ b/IPython/nbconvert/exporters/export.py @@ -18,8 +18,8 @@ from functools import wraps from IPython.nbformat.v3.nbbase import NotebookNode from .exporter import Exporter -from .basichtml import BasicHtmlExporter -from .fullhtml import FullHtmlExporter +from .basichtml import BasicHTMLExporter +from .fullhtml import FullHTMLExporter from .latex import LatexExporter from .markdown import MarkdownExporter from .python import PythonExporter @@ -146,7 +146,7 @@ def export_basic_html(nb, config=None, transformers=None, filters=None): """ Export a notebook object to Basic HTML """ - return export(BasicHtmlExporter, nb, config, transformers, filters) + return export(BasicHTMLExporter, nb, config, transformers, filters) @DocDecorator @@ -154,7 +154,7 @@ def export_full_html(nb, config=None, transformers=None, filters=None): """ Export a notebook object to Full HTML """ - return export(FullHtmlExporter, nb, config, transformers, filters) + return export(FullHTMLExporter, nb, config, transformers, filters) @DocDecorator diff --git a/IPython/nbconvert/exporters/fullhtml.py b/IPython/nbconvert/exporters/fullhtml.py index b7afd8c..e0f2fcd 100644 --- a/IPython/nbconvert/exporters/fullhtml.py +++ b/IPython/nbconvert/exporters/fullhtml.py @@ -16,14 +16,14 @@ Exporter for exporting full HTML documents. from IPython.utils.traitlets import Unicode -from .basichtml import BasicHtmlExporter +from .basichtml import BasicHTMLExporter from IPython.config import Config #----------------------------------------------------------------------------- # Classes #----------------------------------------------------------------------------- -class FullHtmlExporter(BasicHtmlExporter): +class FullHTMLExporter(BasicHTMLExporter): """ Exports a full HTML document. """ @@ -34,6 +34,6 @@ class FullHtmlExporter(BasicHtmlExporter): @property def default_config(self): - c = Config({'CSSHtmlHeaderTransformer':{'enabled':True}}) - c.merge(super(FullHtmlExporter,self).default_config) + c = Config({'CSSHTMLHeaderTransformer':{'enabled':True}}) + c.merge(super(FullHTMLExporter,self).default_config) return c diff --git a/IPython/nbconvert/exporters/reveal.py b/IPython/nbconvert/exporters/reveal.py index 63f18ad..3caf4c6 100644 --- a/IPython/nbconvert/exporters/reveal.py +++ b/IPython/nbconvert/exporters/reveal.py @@ -16,14 +16,14 @@ Reveal slide show exporter. from IPython.utils.traitlets import Unicode from IPython.config import Config -from .basichtml import BasicHtmlExporter +from .basichtml import BasicHTMLExporter from IPython.nbconvert import transformers #----------------------------------------------------------------------------- # Classes #----------------------------------------------------------------------------- -class RevealExporter(BasicHtmlExporter): +class RevealExporter(BasicHTMLExporter): """ Exports a Reveal slide show (.HTML) which may be rendered in a web browser. """ @@ -49,6 +49,6 @@ class RevealExporter(BasicHtmlExporter): @property def default_config(self): - c = Config({'CSSHtmlHeaderTransformer':{'enabled':True}}) + c = Config({'CSSHTMLHeaderTransformer':{'enabled':True}}) c.merge(super(RevealExporter,self).default_config) return c diff --git a/IPython/nbconvert/transformers/csshtmlheader.py b/IPython/nbconvert/transformers/csshtmlheader.py index dd18e45..89a1e22 100755 --- a/IPython/nbconvert/transformers/csshtmlheader.py +++ b/IPython/nbconvert/transformers/csshtmlheader.py @@ -25,7 +25,7 @@ from .activatable import ActivatableTransformer # Classes and functions #----------------------------------------------------------------------------- -class CSSHtmlHeaderTransformer(ActivatableTransformer): +class CSSHTMLHeaderTransformer(ActivatableTransformer): """ Transformer used to pre-process notebook for HTML output. Adds IPython notebook front-end CSS and Pygments CSS to HTML output. @@ -45,7 +45,7 @@ class CSSHtmlHeaderTransformer(ActivatableTransformer): Additional arguments """ - super(CSSHtmlHeaderTransformer, self).__init__(config=config, **kw) + super(CSSHTMLHeaderTransformer, self).__init__(config=config, **kw) if self.enabled : self._regen_header()