<jupyter_start><jupyter_text>Execute notebook+ By default a tag `yyyymmdd_hhmmss.ms` is prepended to the executed notebook - for book keeping+ To execute it in place with set `dated=True`<jupyter_code>path_in = 'sample_notebook.ipynb'
path_nb, tag = execute(path_in, verbose=True)
print(path_nb)
print(tag)<jupyter_output><empty_output><jupyter_text>Configure template+ Params is a helper class to use with the template inside notebook_snapshot<jupyter_code>p = Params(**{'is_ribbon': True, 'ribbon_text': 'Test', 'hide_code': False,
              'ribbon_position': 'top-left', 'ribbon_color': 'orange',
             'ipywidgets': True})
p<jupyter_output><empty_output><jupyter_text>Build template+ Most likely just pass the Params object+ You may also pass a jinja template string `template_str` and its params as a `dict`    + See the notebook_snapshot [template](https://github.com/oscar6echo/notebook-snapshot/blob/master/notebook_snapshot/templates/main.tpl.html) for inspiration<jupyter_code>t = Template(params=p)
t.save()
t.path<jupyter_output><empty_output><jupyter_text>Snapshot notebook+ To apply custom settings set `path_template` to the template path just created+ To burn the images into the html set `embed_img=True`    + *Note:* The notebook must be in its original environment to find the images relative links  WARNING+ If the notebook contains widgets you must manually run the notebook then **save widget state** before conversion+ Actually **clear** then **save** widget states to keep only the last - the previous just bloat the file+ Looking for a way to save widget states programmatically - ideally from nbconvert<jupyter_code>snapshot(path_nb, path_template=t.path, embed_img=True)
move(tag, folder='store', verbose=True)<jupyter_output>Moved the files below to folder store
20180226_134930.183_sample_notebook.ipynb
20180226_134930.183_sample_notebook.html
{'fraction_non_alphanumeric': 0.09177718832891246, 'fraction_numerical': 0.01856763925729443, 'mean_word_length': 6.396078431372549, 'pattern_counts': {'":': 0, '<': 16, '<?xml version=': 0, '>': 16, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '606606', 'license': 'MIT', 'n_tokens_mistral': 602, 'n_tokens_neox': 575, 'n_words': 186, 'path': 'demo_notebook_snapshot.ipynb', 'repo_name': 'oscar6echo/notebook-snapshot', 'size': '1885'}