Created
May 18, 2020 17:19
-
-
Save kevinnls/1f1075067aa71884b6341dc691e55ffe to your computer and use it in GitHub Desktop.
This file contains 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
### BASH script to download the entire CS50 course material + project instructions | |
###DEFINE ALL OF THESE VARIABLES | |
root="http://cdn.cs50.net/mobile/2018/spring" #remove the final / in the link | |
quality=720p #imporant to retain the `p` | |
lec_count=12 #check in root on your browser | |
proj_count=2 #check in root on your browser | |
#UNCOMMENT THE NEXT LINE DOWNLOAD PROJECT INSTRUCTIONS | |
#for i in `seq 0 $proj_count`; do aria2c $root/projects/$i/project$i.zip -d projects/ -c --max-connection-per-server=16; done | |
for i in `seq 0 $lec_count`; | |
do files=( #UNCOMMENT THE FILES YOU WANT | |
#"lecture$i-$quality.mp4" ##the lecture video | |
#"lecture$i.pdf" ##slideshow from the lecture video | |
#"src$i.zip" ##source code from demos in the video | |
#"lang/en/lecture$i.txt" ##full transcript of the video (if you just want to read) | |
#"lang/en/lecture$i.srt" ##srt subtitle file for the video | |
) && for j in "${files[@]}"; | |
do aria2c $root/lectures/$i/$j -d lectures/lecture$i -c --max-connection-per-server=16; done; | |
done; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment