Skip to content
This repository has been archived by the owner on Apr 1, 2021. It is now read-only.

Setup and Execute Manually

Yoon Wai Yan edited this page Aug 20, 2018 · 2 revisions

It is highly recommended to use Docker even if you're not familiar with Docker, as this script requires plenty of libraries to be installed within your system. The setup is already done within a Dockerfile so that all dependencies are taken care for you with only 1 - 2 commands needed to build and run the Docker container. In any case, if you still prefer to run this script directly from your terminal, here are the commands to run the script:

Pre-requisites (Important!!)

The following libraries are essential to run this script without error.

  1. wget (installing guide for macOS system in Stack Overflow) to download file attachments (videos, PDFs and zipped files).
  2. youtube-dl for Wistia videos.

For Non-Ruby Downloaders

If this is the first time you're running a Ruby script, it is recommended to install Ruby via a version manager i.e. rvm or rbenv, but installing Ruby directly is fine for a short term usage to make sure the script is compatible with the current Ruby version.

Installation and Usage

This script requires Mechanize gem to run.

$ bundle install

To use this script:

$ ruby stackskills_dl.rb

The script will prompt your login details and download all courses available in your "Enrolled Courses" page. Alternatively, you can save your credentials to environment variables as STACKSKILLS_EMAIL and STACKSKILLS_PASSWORD for login email and password respectively.

Flags are available to pass login details and optional course link to the script. To see what are the available options, please type:

$ ruby stackskills_dl.rb --help

For example, if you want to download only one course:

Using course ID:

$ ruby stackskills_dl.rb -c https://stackskills.com/courses/enrolled/68582

Using course slug:

$ ruby stackskills_dl.rb -s https://stackskills.com/courses/beginning-rails-programming

Small Note for Windows Users

The script may not be working well with Windows systems based on some issues being reported. If you're familiar with command prompt/Linux based commands and have Git installed, please try to use Git bash to run the script.

If you're facing problems related to wget, do make sure wget can be run within your working directory i.e. directory that runs this script.