Created
July 3, 2017 22:47
-
-
Save bweigel/7c15e266fca6ea6369f7c6425c35214a to your computer and use it in GitHub Desktop.
Clean Jupyter notebooks from output using jq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cat $1 | jq '. + {"cells": [.cells[] | if .cell_type == "code" then . + {"outputs" : []} else . end]}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cool, thanks