base.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. """
  2. Basic post processor
  3. """
  4. # -----------------------------------------------------------------------------
  5. # Copyright (c) 2013, the IPython Development Team.
  6. #
  7. # Distributed under the terms of the Modified BSD License.
  8. #
  9. # The full license is in the file COPYING.txt, distributed with this software.
  10. # -----------------------------------------------------------------------------
  11. # -----------------------------------------------------------------------------
  12. # Imports
  13. # -----------------------------------------------------------------------------
  14. from nbconvert.utils.base import NbConvertBase
  15. # -----------------------------------------------------------------------------
  16. # Classes
  17. # -----------------------------------------------------------------------------
  18. class PostProcessorBase(NbConvertBase):
  19. """The base class for post processors."""
  20. def __call__(self, input_):
  21. """
  22. See def postprocess() ...
  23. """
  24. self.postprocess(input_)
  25. def postprocess(self, input_):
  26. """
  27. Post-process output from a writer.
  28. """
  29. msg = "postprocess"
  30. raise NotImplementedError(msg)