(
        self, scrap_names=None, notebook_names=None, include_data=False, headers=True
    )
Display scraps as markdown structed outputs.

        Parameters
        ----------
        scrap_names : str or iterable[str] (optional)
            the scraps to display as reported outputs
        notebook_names : str or iterable[str] (optional)
            notebook names to use in filtering on scraps to report
        include_data : bool (default: False)
            indicator that data-only scraps should be reported
        header : bool (default: True)
            indicator for if the scraps should render with a header
Display scraps as markdown structed outputs.
Display scraps as markdown structed outputs .
def scraps_report(
        self, scrap_names=None, notebook_names=None, include_data=False, headers=True
    ):
        """
        Display scraps as markdown structed outputs.

        Parameters
        ----------
        scrap_names : str or iterable[str] (optional)
            the scraps to display as reported outputs
        notebook_names : str or iterable[str] (optional)
            notebook names to use in filtering on scraps to report
        include_data : bool (default: False)
            indicator that data-only scraps should be reported
        header : bool (default: True)
            indicator for if the scraps should render with a header
        """
        # Keep slow import lazy
        from IPython.display import display as ip_display, Markdown

        def trim_repr(data):
            # Generate a small data representation for display purposes
            if not isinstance(data, string_types):
                data_str = repr(data)
            if len(data_str) > 102:
                data_str = data_str[:100] + "..."
            return data_str

        if isinstance(scrap_names, string_types):
            scrap_names = [scrap_names]
        scrap_names = set(scrap_names or [])

        if notebook_names is None:
            notebook_names = self._notebooks.keys()
        elif isinstance(notebook_names, string_types):
            notebook_names = [notebook_names]

        for i, nb_name in enumerate(notebook_names):
            notebook = self[nb_name]
            if headers:
                if i > 0:
                    ip_display(Markdown("<hr>"))  # tag between outputs
                ip_display(Markdown("### {}".format(nb_name)))

            for name in scrap_names or notebook.scraps.display_scraps.keys():
                if headers:
                    ip_display(Markdown("#### {}".format(name)))
                notebook.reglue(name, raise_on_missing=False, unattached=True)

            if include_data:
                for name, scrap in scrap_names or notebook.scraps.data_scraps.items():
                    if scrap.display is None and scrap.data is not None:
                        if headers:
                            ip_display(Markdown("#### {}".format(name)))
                            ip_display(trim_repr(scrap.data))
                        else:
                            ip_display("{}: {}".format(scrap.name, trim_repr(scrap.data)))
def scraps_report ( self , scrap_names = None , notebook_names = None , include_data = False , headers = True ) : # Keep slow import lazy from IPython . display import display as ip_display , Markdown def trim_repr ( data ) : # Generate a small data representation for display purposes if not isinstance ( data , string_types ) : data_str = repr ( data ) if len ( data_str ) > 102 : data_str = data_str [ : 100 ] + "..." return data_str if isinstance ( scrap_names , string_types ) : scrap_names = [ scrap_names ] scrap_names = set ( scrap_names or [ ] ) if notebook_names is None : notebook_names = self . _notebooks . keys ( ) elif isinstance ( notebook_names , string_types ) : notebook_names = [ notebook_names ] for i , nb_name in enumerate ( notebook_names ) : notebook = self [ nb_name ] if headers : if i > 0 : ip_display ( Markdown ( "<hr>" ) ) # tag between outputs ip_display ( Markdown ( "### {}" . format ( nb_name ) ) ) for name in scrap_names or notebook . scraps . display_scraps . keys ( ) : if headers : ip_display ( Markdown ( "#### {}" . format ( name ) ) ) notebook . reglue ( name , raise_on_missing = False , unattached = True ) if include_data : for name , scrap in scrap_names or notebook . scraps . data_scraps . items ( ) : if scrap . display is None and scrap . data is not None : if headers : ip_display ( Markdown ( "#### {}" . format ( name ) ) ) ip_display ( trim_repr ( scrap . data ) ) else : ip_display ( "{}: {}" . format ( scrap . name , trim_repr ( scrap . data ) ) )