Permalink
Browse files

Remove immature nbconverter for knowledge posts.

  • Loading branch information...
Matthew Wardrop
Matthew Wardrop committed Jul 5, 2017
1 parent 36f8e3e commit dbc069737f1153b34a276a5729ff0437a2bfe0a6
Showing with 0 additions and 34 deletions.
  1. +0 −29 knowledge_repo/converters/pkp.py
  2. +0 −5 setup.py
@@ -1,8 +1,6 @@
import zipfile
import io
from nbconvert.exporters.exporter import Exporter
from ..converter import KnowledgePostConverter
@@ -36,30 +34,3 @@ def from_file(self, filename):
self.kp._write_ref(ref, f.read())
zf.close()
class NBConvertExporter(Exporter):
def from_notebook_node(self, nb, resources=None, **kw):
"""
Convert a notebook from a notebook node instance.
Parameters
----------
nb : :class:`~nbformat.NotebookNode`
Notebook node (dict-like with attr-access)
resources : dict
Additional resources that can be accessed read/write by
preprocessors and filters.
`**kw`
Ignored
"""
nb_copy = copy.deepcopy(nb)
resources = self._init_resources(resources)
if 'language' in nb['metadata']:
resources['language'] = nb['metadata']['language'].lower()
# Preprocess
nb_copy, resources = self._preprocess(nb_copy, resources)
return nb_copy, resources
View
@@ -80,9 +80,4 @@ def run(self):
'Programming Language :: Python :: 3.6',
],
cmdclass={'install_scripts': install_scripts_windows_wrapper},
entry_points={
'nbconvert.exporters': [
'knowledge_post = knowledge_repo.converters.pkp:NBConvertExporter',
],
}
)

0 comments on commit dbc0697

Please sign in to comment.