slides.py
55 lines
| 1.7 KiB
| text/x-python
|
PythonLexer
Jonathan Frederic
|
r11744 | """ | ||
Jonathan Frederic
|
r11757 | Contains slide show exporter | ||
Jonathan Frederic
|
r11744 | """ | ||
#----------------------------------------------------------------------------- | ||||
# Copyright (c) 2013, the IPython Development Team. | ||||
# | ||||
# Distributed under the terms of the Modified BSD License. | ||||
# | ||||
# The full license is in the file COPYING.txt, distributed with this software. | ||||
#----------------------------------------------------------------------------- | ||||
#----------------------------------------------------------------------------- | ||||
# Imports | ||||
#----------------------------------------------------------------------------- | ||||
from IPython.utils.traitlets import Unicode | ||||
Paul Ivanov
|
r12219 | from IPython.nbconvert import preprocessors | ||
Jonathan Frederic
|
r11744 | from IPython.config import Config | ||
Jonathan Frederic
|
r12505 | from .templateexporter import TemplateExporter | ||
Jonathan Frederic
|
r11744 | |||
#----------------------------------------------------------------------------- | ||||
# Classes | ||||
#----------------------------------------------------------------------------- | ||||
Matthias BUSSONNIER
|
r12500 | class SlidesExporter(TemplateExporter): | ||
Jonathan Frederic
|
r11744 | """ | ||
Exports slides | ||||
""" | ||||
file_extension = Unicode( | ||||
Jonathan Frederic
|
r11759 | 'slides.html', config=True, | ||
Jonathan Frederic
|
r11744 | help="Extension of the file that should be written to disk" | ||
) | ||||
Jonathan Frederic
|
r11745 | default_template = Unicode('reveal', config=True, help="""Template of the | ||
data format to use. I.E. 'reveal'""") | ||||
Jonathan Frederic
|
r11744 | |||
@property | ||||
def default_config(self): | ||||
c = Config({ | ||||
Paul Ivanov
|
r12219 | 'CSSHTMLHeaderPreprocessor':{ | ||
Jonathan Frederic
|
r11744 | 'enabled':True | ||
}, | ||||
Paul Ivanov
|
r12219 | 'RevealHelpPreprocessor':{ | ||
Jonathan Frederic
|
r11744 | 'enabled':True, | ||
}, | ||||
Pablo de Oliveira
|
r12581 | 'HighlightMagicsPreprocessor': { | ||
'enabled':True | ||||
} | ||||
Jonathan Frederic
|
r11744 | }) | ||
c.merge(super(SlidesExporter,self).default_config) | ||||
return c | ||||