问题
My Jupyter workflow for exploratory analysis looks like:
- Fiddle with some parameters.
- Run the notebook; generate output.
- Eyeball outputs.
- Repeat.
Can anyone suggest a command to make the notebook to save a copy of itself (e.g as an html in the output folder), so that if I want to recreate a particular experiment (results from a particular parameter set) I can do so?
回答1:
Yes you can. Just add a safe cell by using cell magic. After using nbconvert you can rename the file and append a date
%%bash
jupyter nbconvert --to html MyNotebookName.ipynb
mv MyNotebookName.html $(date +"%m_%d_%Y-%H%M%S")_MyNotebookName.html
来源:https://stackoverflow.com/questions/38540326/save-html-of-a-jupyter-notebook-from-within-the-notebook