Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Download script for the SICP videos
#!/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
@simlun

This comment has been minimized.

Copy link
Owner Author

@simlun simlun commented Nov 5, 2012

"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:

  • If the script is killed (CTRL+C), the downloads will resume the next time it is executed.
  • It downloads 3 videos simultaneously by default.

Requirements:

  • wget (can be installed via homebrew)
@simlun

This comment has been minimized.

Copy link
Owner Author

@simlun simlun commented Nov 5, 2012

No longer requires wget :)

@simlun

This comment has been minimized.

Copy link
Owner Author

@simlun simlun commented Nov 5, 2012

Hm.. Resuming downloads using cURL wasn't exactly flawless...

@simlun

This comment has been minimized.

Copy link
Owner Author

@simlun simlun commented Nov 5, 2012

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
You can’t perform that action at this time.