mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 07:25:04 +02:00
Use download_modified_or_new as default strategy
This commit is contained in:
parent
2de079a5d3
commit
4c0e3b493a
1 changed files with 4 additions and 3 deletions
|
|
@ -9,7 +9,8 @@ from typing import Optional
|
||||||
from .cookie_jar import CookieJar
|
from .cookie_jar import CookieJar
|
||||||
from .ilias import (IliasAuthenticator, IliasCrawler, IliasDirectoryFilter,
|
from .ilias import (IliasAuthenticator, IliasCrawler, IliasDirectoryFilter,
|
||||||
IliasDownloader, KitShibbolethAuthenticator)
|
IliasDownloader, KitShibbolethAuthenticator)
|
||||||
from .ilias.download_strategies import DownloadStrategy, download_everything
|
from .ilias.download_strategies import (DownloadStrategy,
|
||||||
|
download_modified_or_new)
|
||||||
from .location import Location
|
from .location import Location
|
||||||
from .organizer import Organizer
|
from .organizer import Organizer
|
||||||
from .tmp_dir import TmpDir
|
from .tmp_dir import TmpDir
|
||||||
|
|
@ -75,7 +76,7 @@ class Pferd(Location):
|
||||||
cookies: Optional[Path] = None,
|
cookies: Optional[Path] = None,
|
||||||
username: Optional[str] = None,
|
username: Optional[str] = None,
|
||||||
password: Optional[str] = None,
|
password: Optional[str] = None,
|
||||||
download_strategy: DownloadStrategy = download_everything,
|
download_strategy: DownloadStrategy = download_modified_or_new,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""
|
"""
|
||||||
Synchronizes a folder with the ILIAS instance of the KIT.
|
Synchronizes a folder with the ILIAS instance of the KIT.
|
||||||
|
|
@ -99,7 +100,7 @@ class Pferd(Location):
|
||||||
the user. (default: {None})
|
the user. (default: {None})
|
||||||
download_strategy {DownloadStrategy} -- A function to determine which files need to
|
download_strategy {DownloadStrategy} -- A function to determine which files need to
|
||||||
be downloaded. Can save bandwidth and reduce the number of requests.
|
be downloaded. Can save bandwidth and reduce the number of requests.
|
||||||
(default: {download_everything})
|
(default: {download_modified_or_new})
|
||||||
"""
|
"""
|
||||||
# This authenticator only works with the KIT ilias instance.
|
# This authenticator only works with the KIT ilias instance.
|
||||||
authenticator = KitShibbolethAuthenticator(username=username, password=password)
|
authenticator = KitShibbolethAuthenticator(username=username, password=password)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue