Open indigoviolet opened 1 year ago
I don't understand what exactly you're asking for?
❯ jq -c '.cells[] |select(.cell_type=="code")| .outputs[] | {"name": .name, "output_type": .output_type}' company_data.ipynb | sort | uniq
{"name":null,"output_type":"display_data"}
{"name":null,"output_type":"error"}
{"name":null,"output_type":"execute_result"}
{"name":"stderr","output_type":"stream"}
{"name":"stdout","output_type":"stream"}
I see many different types of output in a single notebook (multiple types for a single cell --- stderr, stdout, error, result etc), and would like control over which are stripped and which are kept, above and beyond the keep_output
tag which keeps all outputs if present.
Gotcha. Do you have an example notebook that could be used to test this @indigoviolet ?
@indigoviolet Do you have an example notebook that could be used to test this?
Is there a way to configure nbstripout to strip certain types of output?
A workaround is
jq 'del(.cells[] | select(.cell_type=="code") | .outputs[] | select(.name=="stderr"))'
, but it would be nice to do this sort of thing in nbstripout directly