Created
November 5, 2012 00:11
-
-
Save simlun/4014494 to your computer and use it in GitHub Desktop.
Download script for the SICP videos
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/bash | |
set -e | |
#DOWNLOAD_COMMAND='curl -s -S -C - -L -O' | |
DOWNLOAD_COMMAND='wget --quiet --continue' | |
SIMULTANEOUS_DOWNLOADS=3 | |
one-word-per-line() { | |
xargs -n 1 echo $@ | |
} | |
urlify() { | |
awk '{ print "http://archive.org/download/MIT_Structure_of_Computer_Programs_1986/lec" $1 ".mp4" }' | |
} | |
special-cases-urlify() { | |
awk '{ print "http://archive.org/download/MIT_Structure_of_Computer_Programs_1986/Lec" $1 ".mp4" }' | |
} | |
list() { | |
echo {1..9}a {1..5}b {7..10}b | one-word-per-line | sort -n | urlify | |
echo 6b 10a | one-word-per-line | special-cases-urlify | |
} | |
download() { | |
xargs -n 1 -P $SIMULTANEOUS_DOWNLOADS $DOWNLOAD_COMMAND $1 | |
} | |
list | download |
No longer requires wget :)
Hm.. Resuming downloads using cURL wasn't exactly flawless...
Crap. It does not work with lecture 10a (That one is apparently named Lec10a.mp4 and not lec10a.mp4...). The same goes for Lec6b.mp4. Now the script isn't as elegant... =/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"This course introduces students to the principles of computation. Upon completion of 6.001, students should be able to explain and apply the basic methods from programming languages to analyze computational systems, and to generate computational solutions to abstract problems."
"These twenty video lectures by Hal Abelson and Gerald Jay Sussman are a complete presentation of the course, given in July 1986 for Hewlett-Packard employees, and professionally produced by Hewlett-Packard Television."
Use this script to download all the Structure and Interpretation of Computer Programs video lectures (http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-001-structure-and-interpretation-of-computer-programs-spring-2005/video-lectures/).
Features:
Requirements: