kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 94 forks source link

[Feature Request] Process Folders (Batch / Bulk) #162

Closed RoyiAvital closed 2 years ago

RoyiAvital commented 2 years ago

It would be great to have an option to process folders (With recursive option as well) and a batch of file with some RegExp like string (Like MyNotes*.ipynb).

Something like:

nbstripout -d <pathToDir>

Will process all files in that folder.

nbstripout -d -r <pathToDir>

Will process all files in the folder and sub folders.

kynan commented 2 years ago

This is a duplicate of #127 and my answer is the same: I'm not going to implement this as you can trivially achieve this with a shell one-liner like

find . -name *.ipynb -exec nbstripout {} +

If you can't live without this you're welcome to have a go at implementing it, but I won't promise I'll merge it as I think it it's entirely unnecessary. See this comment on why it won't be trivial.