slides.py
43 lines
| 1.3 KiB
| text/x-python
|
PythonLexer
MinRK
|
r13664 | """HTML slide show Exporter class""" | ||
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 | ||||
#----------------------------------------------------------------------------- | ||||
Paul Ivanov
|
r12219 | from IPython.nbconvert import preprocessors | ||
Jonathan Frederic
|
r11744 | from IPython.config import Config | ||
MinRK
|
r13664 | from .html import HTMLExporter | ||
Jonathan Frederic
|
r11744 | |||
#----------------------------------------------------------------------------- | ||||
# Classes | ||||
#----------------------------------------------------------------------------- | ||||
MinRK
|
r13664 | class SlidesExporter(HTMLExporter): | ||
"""Exports HTML slides with reveal.js""" | ||||
Jonathan Frederic
|
r11744 | |||
Thomas Kluyver
|
r13925 | def _file_extension_default(self): | ||
return 'slides.html' | ||||
Jonathan Frederic
|
r11744 | |||
Thomas Kluyver
|
r13925 | def _template_file_default(self): | ||
return 'slides_reveal' | ||||
Thomas Kluyver
|
r13830 | |||
Thomas Kluyver
|
r13925 | output_mimetype = 'text/html' | ||
Jonathan Frederic
|
r11744 | |||
@property | ||||
def default_config(self): | ||||
c = Config({ | ||||
MinRK
|
r13664 | 'RevealHelpPreprocessor': { | ||
'enabled': True, | ||||
Jonathan Frederic
|
r11744 | }, | ||
}) | ||||
c.merge(super(SlidesExporter,self).default_config) | ||||
return c | ||||