Created
August 24, 2021 20:39
-
-
Save SubhadityaMukherjee/6325d1f044811e773dfdd4f01f3a840f to your computer and use it in GitHub Desktop.
bash code
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
| # format for python and sort the imports | |
| black "." && isort . | |
| # generate readme | |
| pipreqs . | |
| # Newline | |
| echo " | |
| " >> README.md | |
| # Find all subdirectories but keep the depth to 2 | Add a - to keep the markdown syntax | |
| fd . - type d - maxdepth 2 | sed "s/^/- /" >> README.md | |
| # create scripts if there are any notebook files | |
| for i in $(fd - glob "*.ipynb"); do jupytext - to py $i; done | |
| if [ ! -z $1 ]; then | |
| git add . && git commit -m $1 && git push | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment