##// END OF EJS Templates
s/ConfigurableTransformer/Transformer/
MinRK -
Show More
@@ -1,5 +1,5 b''
1 # Class base Transformers
1 # Class base Transformers
2 from .base import ConfigurableTransformer
2 from .base import Transformer
3 from .convertfigures import ConvertFiguresTransformer
3 from .convertfigures import ConvertFiguresTransformer
4 from .svg2pdf import SVG2PDFTransformer
4 from .svg2pdf import SVG2PDFTransformer
5 from .extractfigure import ExtractFigureTransformer
5 from .extractfigure import ExtractFigureTransformer
@@ -23,7 +23,7 b' from IPython.utils.traitlets import Bool'
23 # Classes and Functions
23 # Classes and Functions
24 #-----------------------------------------------------------------------------
24 #-----------------------------------------------------------------------------
25
25
26 class ConfigurableTransformer(NbConvertBase):
26 class Transformer(NbConvertBase):
27 """ A configurable transformer
27 """ A configurable transformer
28
28
29 Inherit from this class if you wish to have configurability for your
29 Inherit from this class if you wish to have configurability for your
@@ -53,7 +53,7 b' class ConfigurableTransformer(NbConvertBase):'
53 Additional arguments
53 Additional arguments
54 """
54 """
55
55
56 super(ConfigurableTransformer, self).__init__(**kw)
56 super(Transformer, self).__init__(**kw)
57
57
58
58
59 def __call__(self, nb, resources):
59 def __call__(self, nb, resources):
@@ -13,14 +13,14 b' one format to another.'
13 # Imports
13 # Imports
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15
15
16 from .base import ConfigurableTransformer
16 from .base import Transformer
17 from IPython.utils.traitlets import Unicode
17 from IPython.utils.traitlets import Unicode
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Classes
20 # Classes
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22
22
23 class ConvertFiguresTransformer(ConfigurableTransformer):
23 class ConvertFiguresTransformer(Transformer):
24 """
24 """
25 Converts all of the outputs in a notebook from one format to another.
25 Converts all of the outputs in a notebook from one format to another.
26 """
26 """
@@ -19,7 +19,7 b' from pygments.formatters import HtmlFormatter'
19
19
20 from IPython.utils import path
20 from IPython.utils import path
21
21
22 from .base import ConfigurableTransformer
22 from .base import Transformer
23
23
24 from IPython.utils.traitlets import Unicode
24 from IPython.utils.traitlets import Unicode
25
25
@@ -27,7 +27,7 b' from IPython.utils.traitlets import Unicode'
27 # Classes and functions
27 # Classes and functions
28 #-----------------------------------------------------------------------------
28 #-----------------------------------------------------------------------------
29
29
30 class CSSHTMLHeaderTransformer(ConfigurableTransformer):
30 class CSSHTMLHeaderTransformer(Transformer):
31 """
31 """
32 Transformer used to pre-process notebook for HTML output. Adds IPython notebook
32 Transformer used to pre-process notebook for HTML output. Adds IPython notebook
33 front-end CSS and Pygments CSS to HTML output.
33 front-end CSS and Pygments CSS to HTML output.
@@ -15,13 +15,13 b" notebook file. The extracted figures are returned in the 'resources' dictionary"
15
15
16 import sys
16 import sys
17 from IPython.utils.traitlets import Unicode
17 from IPython.utils.traitlets import Unicode
18 from .base import ConfigurableTransformer
18 from .base import Transformer
19
19
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21 # Classes
21 # Classes
22 #-----------------------------------------------------------------------------
22 #-----------------------------------------------------------------------------
23
23
24 class ExtractFigureTransformer(ConfigurableTransformer):
24 class ExtractFigureTransformer(Transformer):
25 """
25 """
26 Extracts all of the figures from the notebook file. The extracted
26 Extracts all of the figures from the notebook file. The extracted
27 figures are returned in the 'resources' dictionary.
27 figures are returned in the 'resources' dictionary.
@@ -17,14 +17,14 b' from __future__ import print_function, absolute_import'
17
17
18 # Our own imports
18 # Our own imports
19 # Needed to override transformer
19 # Needed to override transformer
20 from .base import (ConfigurableTransformer)
20 from .base import (Transformer)
21 from IPython.nbconvert import filters
21 from IPython.nbconvert import filters
22
22
23 #-----------------------------------------------------------------------------
23 #-----------------------------------------------------------------------------
24 # Classes
24 # Classes
25 #-----------------------------------------------------------------------------
25 #-----------------------------------------------------------------------------
26
26
27 class LatexTransformer(ConfigurableTransformer):
27 class LatexTransformer(Transformer):
28 """
28 """
29 Converter for latex destined documents.
29 Converter for latex destined documents.
30 """
30 """
@@ -12,14 +12,14 b''
12 # Imports
12 # Imports
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14
14
15 from .base import ConfigurableTransformer
15 from .base import Transformer
16 from IPython.utils.traitlets import Unicode
16 from IPython.utils.traitlets import Unicode
17
17
18 #-----------------------------------------------------------------------------
18 #-----------------------------------------------------------------------------
19 # Classes and functions
19 # Classes and functions
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21
21
22 class RevealHelpTransformer(ConfigurableTransformer):
22 class RevealHelpTransformer(Transformer):
23
23
24 url_prefix = Unicode('//cdn.jsdelivr.net/reveal.js/2.4.0',
24 url_prefix = Unicode('//cdn.jsdelivr.net/reveal.js/2.4.0',
25 config=True,
25 config=True,
@@ -33,7 +33,7 b' from pygments.formatters import LatexFormatter'
33 from IPython.utils.traitlets import Unicode, Bool
33 from IPython.utils.traitlets import Unicode, Bool
34
34
35 # Needed to override transformer
35 # Needed to override transformer
36 from .base import (ConfigurableTransformer)
36 from .base import (Transformer)
37
37
38 from IPython.nbconvert.utils import console
38 from IPython.nbconvert.utils import console
39
39
@@ -41,7 +41,7 b' from IPython.nbconvert.utils import console'
41 # Classes and functions
41 # Classes and functions
42 #-----------------------------------------------------------------------------
42 #-----------------------------------------------------------------------------
43
43
44 class SphinxTransformer(ConfigurableTransformer):
44 class SphinxTransformer(Transformer):
45 """
45 """
46 Sphinx utility transformer.
46 Sphinx utility transformer.
47
47
General Comments 0
You need to be logged in to leave comments. Login now