Exporting a Jupyter notebook without the input code

1. export to HTML

2. open in a browser (Edge or Chrome)

3. paste JavaScript code into the console, to remove the input fields:

document.querySelectorAll("div.jp-InputArea.jp-Cell-inputArea").forEach(function(a){a.remove()})

- see https://stackoverflow.com/questions/34818723/export-notebook-to-pdf-without-code

4. save as HTML, or print to PDF


Comments