How to use the nbsite.nbbuild.SkipOutput function in nbsite

To help you get started, we’ve selected a few nbsite examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pyviz-dev / nbsite / nbsite / nbbuild.py View on Github external
newnb, _ = ne.from_notebook_node(notebook)
            with open(dest_path,'w') as f:
                f.write(newnb)
            for pattern in patterns_to_take_with_me:
                for f in glob.glob(os.path.join(os.path.dirname(nb_path),pattern)):
                    print("mv %s %s"%(f, os.path.dirname(dest_path)))
                    shutil.move(f,os.path.dirname(dest_path))
    else:
        print('INFO: Skipping existing evaluated notebook {dest_path!s}'.format(
            dest_path=os.path.abspath(dest_path)))

    preprocessors = [FixBackticksInDetails()]
    if substring or offset:
        preprocessors.append(NotebookSlice(substring, end, offset))
    if skip_output:
        preprocessors.append(SkipOutput(skip_output))
    ret = nb_to_html(dest_path, preprocessors=preprocessors)
    return ret
github pyviz-dev / nbsite / nbsite / nbbuild.py View on Github external
def __init__(self, substring=None, **kwargs):
        self.substring = substring
        super(SkipOutput, self).__init__(**kwargs)