class_docstr: FileArchive that can automatically capture notebook data via the
  display hooks and automatically adds a notebook HTML snapshot to
  the archive upon export.
class_docstr_tok: ["FileArchive","that","can","automatically","capture","notebook","data","via","the","display","hooks","and","automatically","adds","a","notebook","HTML","snapshot","to","the","archive","upon","export","."]
docstr: Get the current notebook data and export.
docstr_tok: ["Get","the","current","notebook","data","and","export","."]
code: def export(self, timestamp=None):
      """
      Get the current notebook data and export.
      """
      if self._timestamp is None:
          raise Exception(
              "No timestamp set. Has the archive been initialized?"
          )
      if self.skip_notebook_export:
          super().export(
              timestamp=self._timestamp,
              info={"notebook": self.notebook_name},
          )
          return
  
      self.export_success = None
      name = self.get_namespace()
      # Unfortunate javascript hacks to get at notebook data
      capture_cmd = (
          r"var capture = '%s._notebook_data=r\"\"\"'" % name
      ) + r"+json_string+'\"\"\"'; "
      cmd = (
          r"var kernel = IPython.notebook.kernel; "
          + r"var json_data = IPython.notebook.toJSON(); "
          + r"var json_string = JSON.stringify(json_data); "
          + capture_cmd
          + f"var pycmd = capture + ';{name}._export_with_html()'; "
          + r"kernel.execute(pycmd)"
      )
  
      tstamp = time.strftime(self.timestamp_format, self._timestamp)
      export_name = self._format(
          self.export_name,
          {"timestamp": tstamp, "notebook": self.notebook_name},
      )
      print(
          (
              "Export name: {!r}\nDirectory    {!r}".format(
                  export_name, os.path.join(os.path.abspath(self.root))
              )
          )
          + "\n\nIf no output appears, please check holoviews.archive.last_export_status()"
      )
      display(Javascript(cmd))
  
imports: import os
  import sys
  import time
  import traceback
  import param
  from IPython.display import Javascript, display
  from nbconvert import HTMLExporter, NotebookExporter
  from nbconvert.preprocessors.clearoutput import ClearOutputPreprocessor
  from nbformat import reader
  from ..core.io import FileArchive, Pickler
  from ..plotting.renderer import HTML_TAGS, MIME_TYPES
  from .preprocessors import Substitute
label_desc: Use image node_id 5 for calling the NotebookArchive obj's underlying member method code with example usage: obj.export(timestamp) without return types