-
Notifications
You must be signed in to change notification settings - Fork 4
Features
isisdl
comes with a wide variety of features to support your exact use-case in the best way possible.
It is almost impossible to write software that fits for everyone. Different people have different workflows.
If you want, your password can be stored securely in the central database. This is done by encrypting it with either a user-supplied password or the standard master password.
If you are interested in further reading, check out the (Crypt)[Crypt] wiki Page.
Every time isisdl
starts, it first checks for a new version. Here you can decide if you want to track the GitHub releases or the PyPi ones.
The GitHub one is by design always more recent than the one on PyPi. Thus, if you want the latest features, you will have to track the one on GitHub. Usually the PyPi upload will follow quite shortly after the one on GitHub. It is however tested more and uploaded with more caution.
Sometimes it is really inconvenient to have special characters in your filenames. E.g. LaTeX needs to escape certain symbols in filenames. Lets take A_File.tex
as an example. If you want to \include
it, you would have to write \include{A\_File.tex}
. This is not only inconvenient but also error-prone.
This also happens with most shells. You will have to escape whitespaces in characters etc.
In order to get interoperability with these programs to work, you can enable the safe mode for filenames. When enabled, all "bad" characters are replaced. This is only done when interacting with the operating system i.e. the internal representation will still be the one with special characters. However, when creating and downloading to these files, they will have no special characters.
"Bad" characters are all those characters, which are not in the set {'a'-'z', 'A'-'Z', '0'-'9', '.'}. They are purely ascii and don't have to be url-encoded. This means that using these names should be always safe.
The '.' is there as a delimiter between words and to preserve the filetype. Otherwise, the file hello.pdf
would get transformed into hellopdf
.
Another cool feature is that file names are camelCased after word boundaries. These are all characters in the string ' \t\n\r\v\f_-'. Since this requires the state to be tracked, it is not possible to do this in a single regular expression, but as a for
loop. This makes this a type 2 grammar instead of a type 3 one, which it would otherwise be.
If your OS is Linux and has systemd (does the command systemctl
exist?), you will be able to automatically run isisdl
every hour, if you so wish. This is achieved by having a userspace systemd config file located at ~/.config/systemd/user/isisdl.{service, timer}
. These files contain the logic to run isisdl
automatically.
More precisely the current python executable is chosen as the interpreter when configuring this option. This means that it is possible to let isisdl
be run in a virtual environment.
One noteworthy mention is that is the static build of isisdl
the system executable is different. This is due to the fact how the static build achieves its execution. First a temporary directory is created (in linux under /tmp/...
, in windows under ~/AppData/...
) and there the python interpreter is unpacked. This interpreter does not exist after stopping the executable. So instead the system executable has to be argv[0]
.
Sometimes it is impractical to download with all of your available bandwidth. If you are e.g. watching a live-stream and downloading at the same time, it is very likely that the stream will buffer. If the router scheduler is good, then this might not happen.
In either case you might want to constrain the download rate. You control this with 1 MiB/s precision in the init wizard. There is also the option to only limit the rate, when isisdl
is running automatically which is a great idea if you don't suddenly want a bandwidth hogging program to be run.
Internally this is achieved by a DownloadThrottler. The primary mechanism is that the throttler hands out tokens, with which a thread may download a specified amount of bytes. These tokens are refilled every settings.py::token_queue_refresh_rate = 0.01
seconds.
With this system it is possible to precisely limit the bandwidth into a ~3 MiB/s range.
isisdl
knows of 4 MediaTypes:
- document
- video
- extern
- corrupted
Documents are the usual .pdf
's we all know and love. It is also the default category for anything that gets downloaded.
Videos are those files, which come from the url https://isis.tu-berlin.de/lib/ajax/service.php
, which is the url to retrieve the videos.
Extern links are those, which are regex matched across the entire course page. These may also contain "regular" ISIS .pdf
's, which are not correctly uploaded, but also to more advanced