##// END OF EJS Templates
add docstring
Matthias BUSSONNIER -
Show More
@@ -119,6 +119,7 b' def haspyout_transformer(nb,_):'
119 return nb
119 return nb
120
120
121 class ConverterTemplate(Configurable):
121 class ConverterTemplate(Configurable):
122 """ A Jinja2 base converter templates"""
122
123
123 display_data_priority = ['pdf', 'svg', 'png', 'jpg', 'text']
124 display_data_priority = ['pdf', 'svg', 'png', 'jpg', 'text']
124 #-------------------------------------------------------------------------
125 #-------------------------------------------------------------------------
@@ -132,10 +133,12 b' class ConverterTemplate(Configurable):'
132
133
133 def __init__(self, tplfile='fullhtml', preprocessors=[], config=None, **kw):
134 def __init__(self, tplfile='fullhtml', preprocessors=[], config=None, **kw):
134 """
135 """
135 preprocessors: list of function to run on ipynb json data before conversion
136 tplfile : jinja template file to process.
136 to extract/inline file,
137
137
138 config: the Configurable confg object to pass around
138
139
140 preprocessors: list of function to run on ipynb json data before conversion
141 to extract/inline file,
139
142
140 """
143 """
141 self.template = env.get_template(tplfile+'.tpl')
144 self.template = env.get_template(tplfile+'.tpl')
@@ -146,6 +149,10 b' class ConverterTemplate(Configurable):'
146
149
147
150
148 def process(self):
151 def process(self):
152 """
153 preprocess the notebook json for easier use with the templates.
154 will call all the `preprocessor`s in order before returning it.
155 """
149 nb = self.nb
156 nb = self.nb
150
157
151 for preprocessor in self.preprocessors:
158 for preprocessor in self.preprocessors:
General Comments 0
You need to be logged in to leave comments. Login now