KIT-ILIAS-downloader/README.md

132 lines
5.0 KiB
Markdown
Raw Permalink Normal View History

2020-04-21 20:41:28 +00:00
# KIT-ILIAS-downloader
Download content from ILIAS. That includes:
2021-04-08 17:10:38 +00:00
* files
* exercise sheets and solutions
2020-04-21 20:41:28 +00:00
* Opencast lectures
2021-04-14 15:24:39 +00:00
* forum posts
2020-04-21 20:41:28 +00:00
## Installation
2021-05-14 13:07:00 +00:00
**Windows/Linux users**: go to the [releases](../../releases) and download the executable for your operating system.
**macOS users**:
[Install Rust](https://www.rust-lang.org/tools/install):
```
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
and compile from source:
2020-04-25 08:38:49 +00:00
```
$ cargo install --all-features --git 'https://github.com/FliegendeWurst/KIT-ILIAS-downloader'
2020-04-21 20:41:28 +00:00
```
## Usage
2021-04-19 09:15:55 +00:00
First, open a terminal. Navigate to the directory that contains the downloaded binary.
2021-04-19 08:54:26 +00:00
2021-05-19 09:08:01 +00:00
Then execute the program (use `-o <directory>` to specify the download directory):
2021-04-14 15:24:39 +00:00
```
$ KIT-ILIAS-downloader -o ./ILIAS
```
2020-04-22 12:11:42 +00:00
2021-04-19 08:54:26 +00:00
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
2020-05-11 08:13:57 +00:00
2020-04-25 08:38:49 +00:00
```
2022-07-11 08:22:47 +00:00
KIT-ILIAS-downloader 0.3.5
2020-04-21 21:03:30 +00:00
USAGE:
2020-04-22 10:21:58 +00:00
KIT-ILIAS-downloader [FLAGS] [OPTIONS] --output <output>
2020-04-21 21:03:30 +00:00
FLAGS:
2022-03-21 10:57:45 +00:00
--all Download all courses
2021-11-06 23:08:32 +00:00
--check-videos Re-check OpenCast lectures (slow)
--combine-videos Combine videos if there is more than one stream (requires ffmpeg)
--content-tree Use content tree (experimental)
-f Re-download already present files
-t, --forum Download forum content
-h, --help Prints help information
--keep-session Attempt to re-use session cookies
--keyring Use the system keyring
-n, --no-videos Do not download Opencast videos
--save-ilias-pages Save overview pages of ILIAS courses and folders
-s, --skip-files Do not download files
-V, --version Prints version information
-v Verbose logging
2020-04-21 21:03:30 +00:00
OPTIONS:
2022-07-11 08:22:47 +00:00
-j, --jobs <jobs> Parallel download jobs [default: 1]
-o, --output <output> Output directory
--pass-path <pass-path> Path inside `pass(1)` to the password for your KIT account
-P, --password <password> KIT account password
-p, --proxy <proxy> Proxy, e.g. socks5h://127.0.0.1:1080
--rate <rate> Requests per minute [default: 8]
--sync-url <sync-url> ILIAS page to download
-U, --username <username> KIT account username
2020-04-21 21:03:30 +00:00
```
2020-04-21 20:41:28 +00:00
2020-04-25 08:38:49 +00:00
### .iliasignore
2022-07-11 08:22:47 +00:00
.gitignore syntax can be used in a `.iliasignore` file: (located in the output directory)
2020-04-25 08:38:49 +00:00
```ignore
# example 1: only download a single course
2020-04-25 08:38:49 +00:00
/*/
!/InsertCourseHere/
# example 2: only download files related to one tutorial
/Course/Tutorien/*/
!/Course/Tutorien/Tut* 3/
2020-04-25 08:38:49 +00:00
```
2021-04-19 08:54:26 +00:00
### Credentials
2020-11-09 11:02:44 +00:00
2022-07-11 08:22:47 +00:00
You can use the `--user` and `--keyring` options to get/store the password using the system password store:
2021-04-19 08:54:26 +00:00
```
$ KIT-ILIAS-downloader -U uabcd --keyring [...]
```
2020-11-09 11:02:44 +00:00
2022-07-11 08:22:47 +00:00
If you use [pass](https://www.passwordstore.org/), you can use the `--pass-path` option to specify which password store entry to use:
```
$ KIT-ILIAS-downloader -U uabcd --pass-path edu/kit/uskyk [...]
```
2021-05-01 10:03:31 +00:00
You can also save your username and password in a `.iliaslogin` file: (located in the output folder)
2020-11-09 11:02:44 +00:00
```
username
password
```
2022-07-11 08:22:47 +00:00
When running the downloader multiple times in a short period of time, you may want to use the `--keep-session` flag.
If specified, the downloader will save and restore session cookies (`.iliassession` file in the output directory).
2021-10-01 08:41:22 +00:00
### Renaming course names (0.2.24+)
If you'd like to avoid unwieldy course names (e.g. "24030 Programmierparadigmen"), you can create a `course_names.toml` file in the output directory. It should contain the desired mapping of course names to folder names, e.g.:
```
2021-11-06 23:08:32 +00:00
"24030 Programmierparadigmen" = "ProPa"
2021-10-01 08:41:22 +00:00
"Numerische Mathematik für die Fachrichtungen Informatik und Ingenieurwesen" = "Numerik"
```
2022-11-01 10:09:39 +00:00
## Troubleshooting
### Error when using `--keyring` option
```
PlatformFailure(Zbus(MethodError("org.freedesktop.DBus.Error.ServiceUnknown", Some("The name org.freedesktop.secrets was not provided by any .service files"), Msg { type: Error, sender: "org.freedesktop.DBus", reply-serial: 2, body: Signature: [
s (115),
] })))
```
If you get the above error when activating the `--keyring` option, you need to make sure that your system keyring service (KeePassXC, GNOME Keyring, ...) is running.
2023-11-01 22:39:19 +00:00
## Other useful programs
2020-04-21 20:41:28 +00:00
2023-11-01 22:39:19 +00:00
- https://github.com/Garmelon/PFERD
2021-05-01 10:02:48 +00:00
- https://github.com/DeOldSax/iliasDownloaderTool
2023-11-01 22:39:19 +00:00
- https://github.com/brantsch/kit-ilias-fuse
- https://github.com/Mr-Pine/IliasUploaderUtility (unlike the other tools, this one uploads files)
2023-11-18 17:19:22 +00:00
- https://github.com/I-Al-Istannen/ilias-tests (unlike the other tools, this one processes "tests")