Show More
@@ -53,9 +53,10 b' class Exporter(LoggingConfigurable):' | |||||
53 | help="Extension of the file that should be written to disk" |
|
53 | help="Extension of the file that should be written to disk" | |
54 | ) |
|
54 | ) | |
55 |
|
55 | |||
56 | output_mimetype = Unicode('', config=True, |
|
56 | # MIME type of the result file, for HTTP response headers. | |
57 | help="MIME type of the result file, for HTTP response headers." |
|
57 | # This is *not* a traitlet, because we want to be able to access it from | |
58 | ) |
|
58 | # the class, not just on instances. | |
|
59 | output_mimetype = '' | |||
59 |
|
60 | |||
60 | #Configurability, allows the user to easily add filters and preprocessors. |
|
61 | #Configurability, allows the user to easily add filters and preprocessors. | |
61 | preprocessors = List(config=True, |
|
62 | preprocessors = List(config=True, |
@@ -43,8 +43,7 b' class HTMLExporter(TemplateExporter):' | |||||
43 | default_template = Unicode('full', config=True, help="""Flavor of the data |
|
43 | default_template = Unicode('full', config=True, help="""Flavor of the data | |
44 | format to use. I.E. 'full' or 'basic'""") |
|
44 | format to use. I.E. 'full' or 'basic'""") | |
45 |
|
45 | |||
46 | def _output_mimetype_default(self): |
|
46 | output_mimetype = 'text/html' | |
47 | return 'text/html' |
|
|||
48 |
|
47 | |||
49 | @property |
|
48 | @property | |
50 | def default_config(self): |
|
49 | def default_config(self): |
@@ -63,8 +63,7 b' class LatexExporter(TemplateExporter):' | |||||
63 | #Extension that the template files use. |
|
63 | #Extension that the template files use. | |
64 | template_extension = Unicode(".tplx", config=True) |
|
64 | template_extension = Unicode(".tplx", config=True) | |
65 |
|
65 | |||
66 |
|
|
66 | output_mimetype = 'text/latex' | |
67 | return 'text/latex' |
|
|||
68 |
|
67 | |||
69 |
|
68 | |||
70 | @property |
|
69 | @property |
@@ -30,8 +30,7 b' class MarkdownExporter(TemplateExporter):' | |||||
30 | 'md', config=True, |
|
30 | 'md', config=True, | |
31 | help="Extension of the file that should be written to disk") |
|
31 | help="Extension of the file that should be written to disk") | |
32 |
|
32 | |||
33 | def _output_mimetype_default(self): |
|
33 | output_mimetype = 'text/markdown' | |
34 | return 'text/markdown' |
|
|||
35 |
|
34 | |||
36 | def _raw_mimetypes_default(self): |
|
35 | def _raw_mimetypes_default(self): | |
37 | return ['text/markdown', 'text/html', ''] |
|
36 | return ['text/markdown', 'text/html', ''] |
@@ -29,5 +29,4 b' class PythonExporter(TemplateExporter):' | |||||
29 | 'py', config=True, |
|
29 | 'py', config=True, | |
30 | help="Extension of the file that should be written to disk") |
|
30 | help="Extension of the file that should be written to disk") | |
31 |
|
31 | |||
32 | def _output_mimetype_default(self): |
|
32 | output_mimetype = 'text/x-python' | |
33 | return 'text/x-python' |
|
@@ -30,8 +30,7 b' class RSTExporter(TemplateExporter):' | |||||
30 | 'rst', config=True, |
|
30 | 'rst', config=True, | |
31 | help="Extension of the file that should be written to disk") |
|
31 | help="Extension of the file that should be written to disk") | |
32 |
|
32 | |||
33 | def _output_mimetype_default(self): |
|
33 | output_mimetype = 'text/restructuredtext' | |
34 | return 'text/restructuredtext' |
|
|||
35 |
|
34 | |||
36 | @property |
|
35 | @property | |
37 | def default_config(self): |
|
36 | def default_config(self): |
@@ -31,8 +31,7 b' class SlidesExporter(HTMLExporter):' | |||||
31 | help="Extension of the file that should be written to disk" |
|
31 | help="Extension of the file that should be written to disk" | |
32 | ) |
|
32 | ) | |
33 |
|
33 | |||
34 | def _output_mimetype_default(self): |
|
34 | output_mimetype = 'text/html' | |
35 | return 'text/html' |
|
|||
36 |
|
35 | |||
37 | default_template = Unicode('reveal', config=True, help="""Template of the |
|
36 | default_template = Unicode('reveal', config=True, help="""Template of the | |
38 | data format to use. I.E. 'reveal'""") |
|
37 | data format to use. I.E. 'reveal'""") |
@@ -126,8 +126,6 b' class TemplateExporter(Exporter):' | |||||
126 | help="""Dictionary of filters, by name and namespace, to add to the Jinja |
|
126 | help="""Dictionary of filters, by name and namespace, to add to the Jinja | |
127 | environment.""") |
|
127 | environment.""") | |
128 |
|
128 | |||
129 | output_mimetype = Unicode('') |
|
|||
130 |
|
||||
131 | raw_mimetypes = List(config=True, |
|
129 | raw_mimetypes = List(config=True, | |
132 | help="""formats of raw cells to be included in this Exporter's output.""" |
|
130 | help="""formats of raw cells to be included in this Exporter's output.""" | |
133 | ) |
|
131 | ) |
General Comments 0
You need to be logged in to leave comments.
Login now