Bash wrapper to install, manage and use udemy-dl, the cross-platform python based utility to download courses from udemy for personal offline use.
- https://github.com/seanwhe/udemy-dl-bash-scripts.git
- Git clone with
git clone https://github.com/seanwhe/udemy-dl-bash-scripts.git
There is allot to install so the install script will do most of the heavy lifting. At the start the expectation is that you have:
- Computer running Ubuntu 18.04 (LTS)
- Bash shell
- User account with sudo privileges
- Installed git
- User account on http://udemy.com
- Course you have purchased
Some knowledge of:
- Linux Command Line Interface
- Linux shell
bash
- Change to your user home directory.
cd ~
- Install git.
sudo apt install git
- Clone this project.
git clone https://github.com/seanwhe/udemy-dl-bash-scripts.git
- Change into the cloned directory.
cd udemy-dl-bash-scripts
- Set your values for the following variables:
- _UDEMY_ACCESS_TOKEN
- Run the install script
./install.sh
- Add URL's to courses in courses.txt
- One URL per line
https://www.udemy.com/some-course-name/learn/
- Run the start script
./start.sh
Defaults - The settings.sh contains a number of variables. All files and folders created during install and required for runtime are kept in the directory ~/udemy-dl-bash-scripts/
.
During install the folder source for udemy-dl is cloned into ~/udemy-dl-bash-scripts/
. A folder named download
is also created and will be the location where courses are downloaded to.
Also created is a cookies.sh
and courses.txt
. The cookies.txt
will be created with the value of your access token from _UDEMY_ACCESS_TOKEN
. The courses.txt
is for you to add URL's to the courses you wish to download. Each course URL must be on a single line to create a list. Example of courses.txt:
https://www.udemy.com/some-course-name/learn/
https://www.udemy.com/another-course-name/learn/
https://www.udemy.com/someother-course-name/learn/
Lastly, for ease of use udemy-dl.py is soft linked in the ~/udemy-dl-bash-scripts/
directory.
What follows is a brief of the shell scripts you will find. The names are mostly self explanatory. Comments and notes are used liberally in the scripts to help give you hints as to how it works. The scripts are designed to be modular to promote resuse, execute exclusion and standalone execution.
- build.sh - clones udemy-dl to
~/udemy-dl-bash-scripts.git/udemy-dl
- depends.sh - installs dependancies required by udemy-dl and these scripts.
- install.sh - the main entry point when first installing.
- maintenance.sh - performs apt update, upgrade, autoremove and autoclean operations.
- settings.sh - contains variables used by these scripts.
- start.sh - starts udemy-dl.py passing cookies for access token and course list to download.
It is recommended to run these scripts in a screen session. The output is to std_out so you can watch as it runs.
A simple git update
in ~/udemy-dl-bash-scripts
will update these scripts.
The install script can be run at any time to update the source found ~/udemy-dl-bash-scripts/udemy-dl
.
The branch checkout is taken from the _UDL_BRANCH
variable in settings.sh
. The default branch is set to master
.
A script named update.sh is provided to perform both these steps in a single command.
udemy-dl and udemy-dl bash scripts are different projects run by different people.
While the developers of both projects may be seen interacting with one another on either project, we ask that you report issues to the respective projects. In other words, post issues for:
- udemy-dl, the cross-platform python based utility, over at udemy-dl issue tracker
- xmrig-bash-scripts, these conveniece scripts, over at udemy-dl-bash-scripts
We use SemVer for versioning. For the versions available, see the tags on this repository.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
See also the list of contributors
- Sean Wheller - Initial work - seanwhe
This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details.