I was wondering if their is anyway to go through and make copies of each .ipynb file in a folder and then change that file to .py. I want to keep the .ipynb files but I would like to have a .py file as well. I know how to do it manually but would like a way to do it automatically for each file in a specified directory.
Just try this at Cmd prompt inside that folder.
jupyter nbconvert *.ipynb --to script
Converts all .ipynb files to .py and retains all .ipynb files as well.
Hope it helps
For more details, Check this link as well Save .ipynb to .py automatically on saving notebook
find . -name "*.py" -exec ipython nbconvert --to=python {} \;
should work on Linux.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With