cauldron
cauldron copied to clipboard
Sharing output without the code
Is it possible to save a notebook to an html file without including the code? I can think of many cases where you want to show only the results but keep the way how they were obtained private
Yes, this is definitely a feature I've wanted to add for a while and is on the roadmap.
So, because I needed this feature quickly, I tried tackling it myself. The approach I used was adding a new display-variable in the cauldron.json
file:
{
[...]
"summary": "[...]",
"title": "[...]",
"display": {
"code": false,
"errors": false
}
}
Then I used these information in ProjectStep.dumps
to decide whether the code or the error messages should be rendered: https://github.com/lmr2391/cauldron/commit/b4b5ab0428047612d310c35bc0052462aae5afbd
What do you think about that approach? Features that it doesn't support yet, that were nice, are:
- Being able to decide whether you want to display the code for each step individually
- Switching between displaying and hiding the code without having to rerun the step