Skip to content

A Moodle downloader that downloads course content fast from Moodle (eg. lecture pdfs)

License

Notifications You must be signed in to change notification settings

rar0ch/Moodle-Downloader-2

 
 

Repository files navigation

Moodle Downloader 2

Because manually downloading all the course files every few days is just way too easy inefficient.

Features

  • Watch your Moodle account for any added or changed files in your enrolled courses.
  • Optionally get notified via mail or Telegram about these changes.
  • Save yourself precious time through all these nice features.
  • Do not miss any files, if files are deleted online, they are still available offline.

Setup

  1. You can take the latest release from here or clone the master branch directly.
  2. Install Python >=3.6
  3. Verify that python --version shows a version equal to or higher then 3.6 Otherwise install the newest Python version
  4. pip install --user -r requirements.txt
  5. run python main.py --init

On some operating systems the program has to run with python3 instead of python, try it yourself. The same applies to pip3.

If you run the program on Windows, please use Powershell or CMD. Please do not use a mintty like MINGW or similar (in MINGW python must be executed as winpty python).

Click here for an alternative setup with Docker

Usage

  • python main.py
    • Fetches the current state of your Moodle Account, saves it and detects any changes.
    • If configured, it also sends out a mail-notification.
    • It prints the current status into the console
    • It writes a more detailed log into MoodleDownloader.log for debug purpose.
  • python main.py --init
    • Guides you trough the configuration of the software, including the activation of mail-notifications and obtainment of a login-token for your Moodle-Account.
    • After the necessary configuration, further additional configurations can be made.
    • It does not fetch the current state of your Moodle-Account.
    • If you have to log in with Single Sign On (SSO), you can set the option --sso additionally.
  • python main.py --config
    • Guides you through the additional configuration of the software.
    • This includes the selection of the courses to be downloaded and various configuration options for these courses.
    • You can rename each course individually and decide if a folder structure should be created.
    • You can set whether submissions (files uploaded to Assignments by yourself or a teacher) should be downloaded.
    • You can choose to download descriptions of Moodle courses.
    • You can choose to download databases of Moodle courses.
    • You can set if external linked files should be downloaded (files like youtube videos). To download videos correctly and in high quality you have to install ffmpeg.
    • It does not fetch the current state of your Moodle-Account.
  • python main.py --new-token
    • Overrides the login-token with a newly obtained one.
    • It does not fetch the current state of your Moodle-Account.
    • Use it if at any point in time, for whatever reason, the saved token gets rejected by Moodle.
    • It does not affect the rest of the config.
    • It prints all information into the console.
  • python main.py --change-notification-mail
    • Activate/deactivate/change the settings for receiving notifications via e-mail.
    • It does not affect the rest of the config.
    • It prints all information into the console.
  • python main.py --change-notification-telegram
    • Activate/deactivate/change the settings for receiving notifications via Telegram.
    • It does not affect the rest of the config.
    • It prints all information into the console.
    • Help with setting up Notifications via Telegram will be here soon
  • python main.py --manage-database
    • To manage the offline database.
    • It allows you to delete entries from the database that are no longer available locally so that they can be downloaded again.

Options

Options can be combined with all the actions mentioned above.

  • --path PATH

    • This option can be useful if you want to save the downloaded files in a directory other than the current working directory (the directory where you run the script).
    • Sets the location of the configuration, logs and downloaded files.
    • PATH must be an existing directory in which you have read and write access.
    • Default: current working directory
  • --skip-cert-verify

    • This flag is used to skip the certification verification while sending requests to Moodle.
    • Warning: This might lead to security flaws and should only be used in non-production environments.
    • Default: False
  • --without-downloading-files

    • This flag is used to skip the downloading of files.
    • This allows the local database to be updated to the latest version of Moodle without having to download all files.
  • --sso

    • This flag is used to indicate that a Single Sign On (SSO) login to your Moodle is required.
    • Can be combined with --init and --new-token.

Notes

  • Use a separate E-Mail - Account for sending out the notifications, as its login data is saved in cleartext.
  • The Login-Information for your Moodle-Account is secure, it isn't saved in any way. Only a Login-Token is saved.

Contributing

I'm open for all forks, feedback and Pull Requests ;)

I am happy about every contribution to the project. Because my studies are slowly coming to an end, I am looking for a new Contributor/Maintainer for this project. So if someone is interested in continuing the project or adding a lot new features, please feel free to contact me by mail.

License

This project is licensed under the terms of the GNU General Public License v3.0. For further information, please look here or here(DE).

To mention here is, that this project is based on a project from LucaVazz. He did a very great job creating a "DualisWatcher".

About

A Moodle downloader that downloads course content fast from Moodle (eg. lecture pdfs)

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Python 99.9%
  • Dockerfile 0.1%