From e397ecf73b5f39274c2564fb6430eb75e76325f5 Mon Sep 17 00:00:00 2001 From: FliegendeWurst <2012gdwu+github@posteo.de> Date: Mon, 19 Apr 2021 10:54:26 +0200 Subject: [PATCH] Document more functionality --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 39 +++++++++++++++++++++++++++++---------- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0584a59..b325969 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "KIT-ILIAS-downloader" -version = "0.2.15" +version = "0.2.16" dependencies = [ "anyhow", "cfg-if", diff --git a/Cargo.toml b/Cargo.toml index a07c75c..63e0bac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "KIT-ILIAS-downloader" -version = "0.2.15" +version = "0.2.16" authors = ["FliegendeWurst <2012gdwu@web.de>"] license = "GPL-2.0" edition = "2018" diff --git a/README.md b/README.md index 67087c6..68a86da 100644 --- a/README.md +++ b/README.md @@ -9,44 +9,59 @@ Download content from ILIAS. That includes: ## Installation -Go to the [releases](../../releases) and get the executable for your operating system. Or compile from source: +Go to the [releases](../../releases) and get the executable for your operating system (Windows/Linux only). +Or compile from source (mandatory if you use a Mac): ``` $ git clone https://github.com/FliegendeWurst/KIT-ILIAS-downloader $ cd KIT-ILIAS-downloader -$ cargo install --path . +$ cargo install --all-features --path . ``` ## Usage +First, open a terminal (use Powershell on Windows). + Use `-o ` to specify the download directory: ``` $ KIT-ILIAS-downloader -o ./ILIAS ``` -Only content on your [personal desktop](https://ilias.studium.kit.edu/ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems) will be downloaded. +By default, only content on your [personal desktop](https://ilias.studium.kit.edu/ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToSelectedItems) will be downloaded. +Use the `--sync-url` option to download a specific page and its sub-pages: (the URL should be copied from an ILIAS link, not the browser URL bar) + +``` +$ KIT-ILIAS-downloader -o ./ILIAS/WS2021-HM1 --sync-url 'https://ilias.studium.kit.edu/ilias.php?ref_id=1276968&cmdClass=ilrepositorygui&cmdNode=uk&baseClass=ilRepositoryGUI' +``` + +### Options ``` $ KIT-ILIAS-downloader --help -KIT-ILIAS-downloader 0.2.14 +KIT-ILIAS-downloader 0.2.16 USAGE: KIT-ILIAS-downloader [FLAGS] [OPTIONS] --output FLAGS: + --check-videos Re-check OpenCast lectures (slow) --content-tree Use content tree (slow but thorough) -f Re-download already present files -t, --forum Download forum content -h, --help Prints help information + --keyring Use the system keyring -n, --no-videos Do not download Opencast videos -s, --skip-files Do not download files -V, --version Prints version information - -v Verbose logging (print objects downloaded) + -v Verbose logging OPTIONS: - -j, --jobs Parallel download jobs [default: 1] - -o, --output Output directory - -p, --proxy Proxy, e.g. socks5h://127.0.0.1:1080 [default: ""] + -j, --jobs Parallel download jobs [default: 1] + -o, --output Output directory + -P, --password KIT account password + -p, --proxy Proxy, e.g. socks5h://127.0.0.1:1080 + --sync-url ILIAS page to download + -U, --username KIT account username ``` ### .iliasignore @@ -61,10 +76,14 @@ OPTIONS: !/Course/Tutorien/Tut* 3/ ``` -### .iliaslogin +### Credentials -If you don't want to enter your credentials every time you run the program, you can instead save your username and password in a file (`.iliaslogin`): +You can use the `--user` and `--keyring` options to get/store the password using the system password store: +``` +$ KIT-ILIAS-downloader -U uabcd --keyring [...] +``` +You can also save your username and password in a `.iliaslogin` file: ``` username password