Created
February 25, 2018 17:38
-
-
Save DahlitzFlorian/03699c8aa2f015528807507c6dec0f97 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
| if [ "$1" == "-r" ] | |
| then | |
| LANG=R | |
| shift | |
| else | |
| LANG=python | |
| fi | |
| cd ~/workspace/$LANG/notebooks | |
| ARG=$1 | |
| if [ "$ARG" == "--pdf" ] | |
| then | |
| find . -type f -name "*.ipynb" -exec jupyter nbconvert --to pdf {} \; | |
| mv **/*.pdf ./pdf/ | |
| mv ./*.pdf ./pdf/ | |
| else | |
| find . -name "*.ipynb.json" -exec bash -c 'mv "$1" "${1%.ipynb.json}".ipynb' - '{}' \; | |
| jupyter notebook | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment