Commit Graph

137 Commits

Author SHA1 Message Date
FliegendeWurst
2d59d2280e Update dependencies 2023-07-24 08:50:34 +02:00
Maximilian Bosch
3f326713ba
Fix clippy hints
* https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
  (-D clippy::collapsible-else-if)
* https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
  (-D clippy::needless-borrow)
* https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
  (-D clippy::into-iter-on-ref)
* https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
  (-D clippy::map-flatten)
* https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
  (-D clippy::len-zero)
2023-07-09 11:53:08 +02:00
Maximilian Bosch
05abc5bdad
Run cargo fmt 2023-07-09 11:36:01 +02:00
Maximilian Bosch
0396dfc096
Fix build 2023-07-09 11:35:29 +02:00
FliegendeWurst
ebe2db5987 Recognize when logged out 2023-06-12 09:19:37 +02:00
FliegendeWurst
ff982a5723 Expand individual sessions 2022-12-19 19:13:08 +01:00
FliegendeWurst
cc7dcd6f9d feat: respect .iliasignore files in parent folder
see #38
2022-11-23 15:10:39 +01:00
FliegendeWurst
f2c9ce5fa0 Apply rustfmt 2022-10-21 09:50:13 +02:00
funnym0nk3y
596c7dd355 Fixed video regex 2022-08-31 01:01:47 +02:00
Maximilian Bosch
8131acc75a
pass login: Only use first line from result
It's possible to create multi-line entries in `pass(1)` where additional
lines have further metadata, e.g.

    $ pass show kit-access
    <secret pw>
    user: uXXXX

which can be helpful to persist e.g. the corresponding username.

However it's a convention that the password is only in the first line,
e.g. `pass show -c` (which is used by `passmenu` to copy a secret into
the clipboard) only the first line is used by default.

I switched to such an approach recently and realized that this is now a
problem because `KIT-ILIAS-Downloader` passes the entire string to the
SAML login, so I decided to just strip everything after the first line
in the output of `pass show`.

We may want to implement support for extracting usernames from such a
format in the future, but... that's an exercise left for the reader ;-)
2022-08-06 14:33:33 +02:00
FliegendeWurst
a48060a9a5 Update readme and changelog 2022-07-11 10:22:47 +02:00
Maximilian Bosch
3a83840f15
cli: Support for pass(1) as credential storage
`pass(1)`[1] is a small CLI-based password manager. When passing
`--pass-path edu/kit/uXXXX` to `KIT-ILIAS-Downloader`, it now attempts
to retrieve the password from `pass(1)`.

It is assumed that `pass(1)` is available in the `$PATH` of the process. If
that's not the case, it errors out with an error like this:

    Error: credentials input failed

    Caused by:
        pass not found in $PATH!

It's also taken care of the case where the value `--pass-path` is not
present in the store, the error will look like this:

    Error: credentials input failed

    Caused by:
        `pass` failed with non-zero exit code 1: Error: edu/kit/uXXXX is not in the password store.

Closes #32

[1] https://www.passwordstore.org/
2022-07-10 12:34:03 +02:00
FliegendeWurst
147af49eb8 Warn the user on duplicate folder names
See #31
2022-04-26 21:47:17 +02:00
FliegendeWurst
372f9d67d2 Update dependencies 2022-03-21 11:47:01 +01:00
FliegendeWurst
8906069a67 Add command-line option to download all courses 2022-03-21 11:44:06 +01:00
funnym0nk3y
e931815cd4
Fixed bug with video download
Fixed #27
2022-01-21 01:43:58 +01:00
FliegendeWurst
7d641d5329 Support downloading every course 2022-01-07 12:21:40 +01:00
FliegendeWurst
b44c31d8d4 Simplify link extractor 2022-01-07 12:19:39 +01:00
FliegendeWurst
38ee7ed31e Remove dead code 2022-01-06 16:41:48 +01:00
FliegendeWurst
4a97f0a659 Properly extract dashboard items 2022-01-06 16:41:48 +01:00
FliegendeWurst
126f8500e4 Make keyring support non-optional
Now that the dbus library isn't needed..
2022-01-06 15:57:50 +01:00
FliegendeWurst
bd9a777bb9 Fix video downloading (ILIAS 7 update)
see #27
2022-01-06 15:49:54 +01:00
FliegendeWurst
6dd16deb40 Replace personal desktop with dashboard downloader
ILIAS 7 update, see #27
2022-01-06 15:37:57 +01:00
FliegendeWurst
e207eb3f06 Version 0.2.24 2021-11-01 17:46:12 +01:00
FliegendeWurst
a6c0e97755 Don't create folders for ignored items (fix #21) 2021-11-01 17:44:20 +01:00
FliegendeWurst
3e0a2bf154 Add option to save ILIAS pages (fix #22) 2021-11-01 17:40:11 +01:00
FliegendeWurst
1c41c95773 Download/combine multiple video streams (fix #24) 2021-11-01 17:36:25 +01:00
FliegendeWurst
bcf3c3f9ef Minor code style improvements 2021-10-01 09:19:53 +02:00
lukasprobst
2483ee1906 Add an option to rename course names with a .toml file 2021-09-30 16:58:42 +02:00
FliegendeWurst
0a1c8696b4 Typo fix 2021-06-28 18:43:09 +02:00
FliegendeWurst
b4861a5e3f Add doctype and base href to forum post HTML 2021-06-11 15:20:47 +02:00
FliegendeWurst
d5cc512a7e Skip downloading zip of forum post attachments 2021-06-11 15:12:11 +02:00
FliegendeWurst
e4015e723d Output saved attachments 2021-06-11 15:01:09 +02:00
FliegendeWurst
1a95ad6f59 Always save page HTML 2021-06-07 12:30:57 +02:00
FliegendeWurst
4967e8afba Specify link base in saved HTML pages 2021-06-04 10:12:28 +02:00
FliegendeWurst
1459ff5ae4 Add missing await 2021-06-02 11:53:50 +02:00
FliegendeWurst
e7354e0ad1 Split downloading logic into modules 2021-06-02 11:13:13 +02:00
FliegendeWurst
0ebe5bc3cf Display session validation result 2021-05-30 17:14:58 +02:00
FliegendeWurst
b7330130fb Actually check previous session 2021-05-30 14:29:40 +02:00
FliegendeWurst
6ea00d5f59 Actually save session cookies
the cookie store crate by default only saves persistent cookies ...
2021-05-30 14:12:38 +02:00
FliegendeWurst
daa9bdbfa4 Error on expired session 2021-05-30 14:07:55 +02:00
FliegendeWurst
8ea2cae769 Session re-use 2021-05-30 13:39:40 +02:00
FliegendeWurst
5fb2faabfd Consistent code formatting 2021-05-28 16:02:05 +02:00
FliegendeWurst
a003d27442 Support download of other personal desktop pages 2021-05-28 15:32:40 +02:00
FliegendeWurst
9da1a9d2d7 Update dependencies and license
Since rpassword and rprompt are licensed under the Apache 2.0
the combined product has to be GPLv3+, not GPLv2.
2021-05-28 13:21:49 +02:00
FliegendeWurst
ac02493dbd Only show HTTP/2 warning in verbose mode 2021-05-18 08:47:52 +02:00
FliegendeWurst
6d4a1903fb Fix logging when the progress bar is enabled 2021-05-17 18:12:11 +02:00
FliegendeWurst
044caf497c Actually correct handling of HTTP/2 NO_ERROR 2021-05-17 18:06:25 +02:00
FliegendeWurst
8a1a5f6165 Organize code into modules 2021-05-17 18:05:54 +02:00
FliegendeWurst
a6a40f69c8 Fix automatic output directory creation 2021-05-14 14:29:24 +02:00