##// END OF EJS Templates
s/ConfigurableTransformer/Transformer
Jonathan Frederic -
Show More
@@ -1,48 +1,48 b''
1 """
1 """
2 Contains CheeseTransformer
2 Contains CheeseTransformer
3 """
3 """
4 #-----------------------------------------------------------------------------
4 #-----------------------------------------------------------------------------
5 # Copyright (c) 2013, the IPython Development Team.
5 # Copyright (c) 2013, the IPython Development Team.
6 #
6 #
7 # Distributed under the terms of the Modified BSD License.
7 # Distributed under the terms of the Modified BSD License.
8 #
8 #
9 # The full license is in the file COPYING.txt, distributed with this software.
9 # The full license is in the file COPYING.txt, distributed with this software.
10 #-----------------------------------------------------------------------------
10 #-----------------------------------------------------------------------------
11
11
12 #-----------------------------------------------------------------------------
12 #-----------------------------------------------------------------------------
13 # Imports
13 # Imports
14 #-----------------------------------------------------------------------------
14 #-----------------------------------------------------------------------------
15
15
16 from ...transformers.base import ConfigurableTransformer
16 from ...transformers.base import Transformer
17
17
18 #-----------------------------------------------------------------------------
18 #-----------------------------------------------------------------------------
19 # Classes
19 # Classes
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21
21
22 class CheeseTransformer(ConfigurableTransformer):
22 class CheeseTransformer(Transformer):
23 """
23 """
24 Adds a cheese tag to the resources object
24 Adds a cheese tag to the resources object
25 """
25 """
26
26
27
27
28 def __init__(self, **kw):
28 def __init__(self, **kw):
29 """
29 """
30 Public constructor
30 Public constructor
31 """
31 """
32 super(CheeseTransformer, self).__init__(**kw)
32 super(CheeseTransformer, self).__init__(**kw)
33
33
34
34
35 def call(self, nb, resources):
35 def call(self, nb, resources):
36 """
36 """
37 Sphinx transformation to apply on each notebook.
37 Sphinx transformation to apply on each notebook.
38
38
39 Parameters
39 Parameters
40 ----------
40 ----------
41 nb : NotebookNode
41 nb : NotebookNode
42 Notebook being converted
42 Notebook being converted
43 resources : dictionary
43 resources : dictionary
44 Additional resources used in the conversion process. Allows
44 Additional resources used in the conversion process. Allows
45 transformers to pass variables into the Jinja engine.
45 transformers to pass variables into the Jinja engine.
46 """
46 """
47 resources['cheese'] = 'real'
47 resources['cheese'] = 'real'
48 return nb, resources
48 return nb, resources
General Comments 0
You need to be logged in to leave comments. Login now