Skip to content
/ ocwd Public

Bulk download MIT OCW course resources at one click!

License

Notifications You must be signed in to change notification settings

amkhrjee/ocwd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ocwd

Bulk download courses at the press of a button 📥

GitHub code size in bytes GitHub PowerShell Gallery PowerShell Gallery Version PowerShell Gallery

What does ocwd do?

ocwd is a command line utility that downloads resources at bulk from any MIT OCW course to any storage path provided by you, with just one key press!

The resources are available under the creative commons license and MIT reserves all rights to the content. This tool simply scrapes the OCW website for resources and offers a simple and easy way for downloading any course resource for offline use.

Installation Guide

Without using PowerShell

🐧 Linux + 🍎 macOS

Paste the following to your terminal:

/bin/bash -c "$(sudo curl -fsSL https://raw.githubusercontent.com/amkhrjee/ocwd/main/ocwd.sh -o /usr/local/bin/ocwd && sudo chmod +x /usr/local/bin/ocwd)"

This simply copies the ocwd.sh file to your /usr/local/bin/ directory. Now you can use ocwd from any directory in your system.


Using PowerShell

🪟 Windows

ocwd works with both Windows PowerShell and the cross-platform PowerShell-Core.

All recent versions of Windows 10 & 11 already come with Windows PowerShell installed (search for PowerShell using Windows Search to find out whether you have it or not). However, you can also follow the installation guides provided here in case you don't have PowerShell installed.

PowerShell Installation Guide for Windows

PowerShell comes in two flavours - PowerShell Windows and PowerShell-Core. You are recommened to download PS-Core, as it is the one in active development by Microsoft and thus have the latest features. `ocwd` downloads work faster with PS-Core (thanks to multi-threading!)

PowerShell Core Installation Guide

You can read the official installtion guide here.

PowerShell Core is a cross-platform version of PowerShell that is open-source and available on Windows, macOS, and Linux. Here is a guide to install PowerShell Core on your system:

  1. First, visit the following link to download the latest version of PowerShell Core: https://github.com/powershell/powershell/releases

  2. Select the appropriate download link for your system. For example, if you are running Windows, select the MSI installer link. If you are running macOS or Linux, select the appropriate package for your system.

  3. Once the download is complete, open the installer file and follow the prompts to install PowerShell Core on your system.

  4. Once the installation is complete, you can launch PowerShell Core by opening a terminal window and typing pwsh.

To verify that PowerShell Core has been installed correctly, you can run the following command:

$PSVersionTable

This should display information about the version of PowerShell Core that you have installed.

That's it! You have now installed PowerShell Core on your system. You can start using PowerShell Core by typing commands into the terminal window.

Windows PowerShell Installation Guide

Windows PowerShell is a command-line shell and scripting language that is included with Windows by default. Here is a guide to install Windows PowerShell:

  1. Check if Windows PowerShell is already installed on your system. To do this, open the Start menu and search for "PowerShell". If PowerShell is installed, you should see it listed in the search results.

  2. If Windows PowerShell is not installed on your system, you can install it by following these steps:

On Windows 10/11:

  • Go to the Start menu and select "Settings".
  • Select "Apps" from the settings menu.
  • Click on "Apps & features" from the left menu.
  • Click on the "Manage optional features" button.
  • Click on the "Add a feature" button.
  • Scroll down the list of features and select "Windows PowerShell".
  • Click the "Install" button to begin the installation process.

On Windows 7:

  • Go to the following link to download the Windows Management Framework (WMF) installer: https://www.microsoft.com/en-us/download/details.aspx?id=54616
  • Once the download is complete, open the installer file and follow the prompts to install WMF on your system. This will install Windows PowerShell on your system.
  1. Once the installation is complete, you can launch Windows PowerShell by opening the Start menu and searching for "PowerShell".

  2. To verify that Windows PowerShell has been installed correctly, you can run the following command:

$PSVersionTable

This should display information about the version of Windows PowerShell that you have installed.

That's it! You have now installed Windows PowerShell on your system. You can start using Windows PowerShell by typing commands into the terminal window.

If you have PowerShell installed, we can proceed to install ocwd.

ocwd is currently available via Microsoft's PSGallery. If you have installed external scripts before, you can skip to the installation script, otherwise, open PowerShell in Administrator Mode and paste the following in order:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

This will install ocwd to your system:

Install-Script -Name ocwd

After the installation is over, you are suggested to close and reopen your terminal for reloading the shell.

Usage

There are two ways to use ocwd:

ocwd your_link_here

or just type in the command:

ocwd

Demo

demo image

If the GIF is not working, you can watch this demo video instead: https://www.youtube.com/watch?v=9Oe9vrEQY28