A server for MIT OpenCourseWare content
- Install Deno
- Clone this repository
- Make this function available by adding the following to your
.bashrcor.zshrc:
ocw() {
(cd /path/to/repo && deno task $@)
}- Run
ocw indexonce to create thepublic/index.htmlfile (even if you haven't downloaded any courses yet) - Run
ocw startto start the server
You can also run ocw to see a list of available commands.
Run ocw download <course id> to download a course. For example, if the course URL were https://ocw.mit.edu/courses/16-00-introduction-to-aerospace-engineering-and-design-spring-2003/, the ID would be 16-00-introduction-to-aerospace-engineering-and-design-spring-2003. This will download it to the public folder.
After the course downloads, run ocw index to index the courses and update public/index.html. You can now run ocw start to start the server and view the course (you might need to hard refresh the page or clear your cache for it to update).
start: Starts the serverdownload <course id>: Downloads a courseindex: Indexes all courses