# 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, XMPP or [Telegram](https://telegram.org/apps) 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
If you use *Arch Linux*, you can install the package [from AUR](https://aur.archlinux.org/packages/moodle-dl-git/), otherwise you can follow this procedure:
1. Install [Python](https://www.python.org/) >=3.7
2. Install [ffmpeg](https://github.com/C0D3D3V/Moodle-Downloader-2/wiki/Installing-ffmpeg)
3. Run `pip install moodle-dl` as administrator. </br>
<sup>(To upgrade from an older Version use `pip install -U moodle-dl` instead)</sup>
4. Run `moodle-dl --init` in the desired download directory.
If you run the program on **Windows**, please use [Powershell or CMD](https://www.isunshare.com/windows-10/5-ways-to-open-windows-powershell-in-windows-10.html). Please do not use a mintty like MINGW or similar.
<sup>[Click here for an alternative setup with Docker](https://github.com/C0D3D3V/Moodle-Downloader-2/wiki/Run-with-Docker)</sup>
### Usage
- `moodle-dl`
- Fetches the current state of your Moodle Account, saves it and detects any changes.
- If configured, it also sends out a notifications.
- It prints the changes into the console
- `moodle-dl --init`
- Guides you trough the configuration of the software, including the activation of notifications and obtainment of a login-token for your Moodle-Account.
- After the necessary configuration, further additional configurations can be made.
- If you have to log in with Single Sign On (SSO), you can set the option `--sso` additionally.
- `moodle-dl --config`
- Guides you through the additional configuration of the software.
- The guide allows you to
- select the courses that will be downloaded.
- rename each course individually.
- decide if subfolders should be created inside a course folder.
- set whether submissions (files uploaded to assignments by yourself or a teacher), descriptions, links inside descriptions, databases and forum discussions should be downloaded.
- set if external linked files should be downloaded (files like youtube videos).
- set if files on moodle that require a cookie should be downloaded.
- to add extra courses to your download list which you can see but you are not enrolled in, check out [this wiki entry](https://github.com/C0D3D3V/Moodle-Downloader-2/wiki/Download-public-courses).
- `moodle-dl --new-token`
- Overrides the login-token with a newly obtained one.
- The script will ask for credentials unless they are explicitly specify with the options `--username` and `--password`
- Use it if at any point in time, for whatever reason, the saved token gets rejected by Moodle.
- `moodle-dl --change-notification-mail`
- Activate/deactivate/change the settings for receiving notifications via e-mail.
- `moodle-dl --change-notification-telegram`
- Activate/deactivate/change the settings for receiving notifications via Telegram.
- Click [here for help](https://github.com/C0D3D3V/Moodle-Downloader-2/wiki/Telegram-Notification) in setting up telegram notifications
- `moodle-dl --change-notification-xmpp`
- Activate/deactivate/change the settings for receiving notifications via XMPP.
- `moodle-dl --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.
- `moodle-dl --version`
- Print program version and exit
- `moodle-dl --log-responses`
- To generate a `responses.log` file, in which all JSON responses from Moodles are logged along with the requested URL
- This is for development and debugging purposes only. The log file may contain private data.
### 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
- `--threads INT`
- Overwrites the number of download threads. (default: 5)
- `--verbose`
- Print various debugging information into the `MoodleDownloader.log` file.
- `--username USERNAME`
- Can be used to automate the `--new-token` process.
- Specify username to skip the query when creating a new token.
- `--password PASSWORD`
- Can be used to automate the `--new-token` process.
- Specify password to skip the query when creating a new token.
- If the password contains special characters like spaces you can enclose it in quotation marks
- `--skip-cert-verify`
- This flag is used to skip the certification verification while sending requests to Moodle and all other websites.
- Warning: This might lead to security flaws and should only be used in non-production environments.
- Default: False
- `--ignore-ytdl-errors`
- If this option is set, errors that occur when downloading with the help of Youtube-dl are ignored. Thus, no further attempt will be made to download the file using youtube-dl.
- By default, youtube-dl errors are critical, so the download of the corresponding file will be aborted and when you run moodle-dl again, the download will be repeated.
- You can use this option if a download using youtube-dl fails repeatedly.
- `--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.
- This can also be used to ignore recurring errors by adding the files that produce the errors to the database. So these files are not downloaded again.
- `--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/XMPP - 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.
- Your Moodle token is stored in the configuration file (`config.json`). Be careful that no unauthorized person reads this file, especially the token must not be given to an unauthorized person, this can cause a lot of trouble.
- The `privatetoken` can be used to create a cookie for your Moodle account. A Cookie is what is used to tell Moodle that you are logged in. The `cookie.txt` always keeps a valid cookie for you, take great care of this file, if it falls into the wrong hands someone can take over your entire Moodle account. This feature is only important for Moodles with plugins installed that are not supported by the Moodle app. If you do not want to generate cookies, remove the `privatetoken` from the `config.json`.
---
### 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](http://choosealicense.com/licenses/gpl-3.0/) or [here<sup>(DE)</sup>](http://www.gnu.org/licenses/g
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
注意您的Moodle帐户中已注册课程中所有添加或更改的文件。 (可选)通过邮件,XMPP或有关这些更改的通知。 通过所有这些出色的功能,节省您宝贵的时间。 不要错过任何文件,如果在线删除文件,它们仍然可以脱机使用。 建立 如果使用Arch Linux ,则可以安装软件包,否则可以按照以下步骤进行: 安装 > = 3.7 安装 以管理员身份运行pip install moodle-dl 。 (要从旧版本升级,请使用pip install -U moodle-dl代替) 在所需的下载目录中运行m
资源推荐
资源详情
资源评论
收起资源包目录
Moodle-Downloader-2-main.rar (70个子文件)
Moodle-Downloader-2-main
.vscode
settings.json 858B
launch.json 432B
setup.py 2KB
.github
ISSUE_TEMPLATE
feature_request.md 1KB
bug_report.md 1KB
workflows
python-publish.yml 865B
moodle_dl
__init__.py 2B
state_recorder
__init__.py 0B
course.py 1011B
file.py 6KB
offline_service.py 3KB
state_recorder.py 24KB
version.py 23B
moodle_connector
__init__.py 0B
cookie_handler.py 3KB
sso_token_receiver.py 2KB
first_contact_handler.py 2KB
results_handler.py 14KB
assignments_handler.py 7KB
forums_handler.py 8KB
databases_handler.py 5KB
moodle_service.py 17KB
request_helper.py 12KB
login_helper.py 1KB
main.py 18KB
utils
__init__.py 0B
process_lock.py 839B
logger.py 2KB
cutie.py 14KB
config_service
__init__.py 0B
config_helper.py 7KB
config_service.py 16KB
ydl_extractors
extractors.py 482B
__init__.py 0B
opencast.py 10KB
zoomus.py 3KB
notification_services
__init__.py 0B
notification_service.py 2KB
xmpp
__init__.py 0B
xmpp_shooter.py 731B
xmpp_service.py 5KB
xmpp_bot.py 589B
mail
__init__.py 0B
mail_service.py 6KB
header_extender.png 2KB
header.png 36KB
mail_formater.py 10KB
mail_shooter.py 2KB
console
__init__.py 0B
console_service.py 3KB
telegram
__init__.py 0B
telegram_shooter.py 3KB
telegram_formater.py 3KB
telegram_service.py 5KB
download_service
__init__.py 0B
downloader.py 2KB
url_target.py 32KB
download_service.py 11KB
fake_download_service.py 3KB
path_tools.py 3KB
AUTHORS 241B
LICENSE 34KB
CONTRIBUTING.md 5KB
Dockerfile 104B
moodle-dl 116B
CODE_OF_CONDUCT.md 5KB
MANIFEST.in 100B
.gitignore 77B
.dockerignore 43B
README.md 8KB
共 70 条
- 1
资源评论
hutian1993
- 粉丝: 1
- 资源: 149
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功