Sync API Reference
BlackboardSync
BlackboardSync.
Automatically sync content from Blackboard
- class blackboard_sync.sync.BlackboardSync[source]
Represents an instance of the BlackboardSync application.
Create an instance of the program.
- _sync_task() None [source]
Constantly check if the data is outdated and if so start a download job.
Method run by Sync thread.
- auth(cookie_jar: RequestsCookieJar) bool [source]
Create a new Blackboard session with the given credentials.
Will start syncing automatically if login successful.
- Parameters:
persistence (bool) – If true, login will be saved in the OS designated keyring.
- change_download_location(new_dir: Path, redownload: bool = False) None [source]
Set new sync location.
- Parameters:
dir (Path) – The path of the sync dir.
redownload (bool) – If true, ALL content will be re-downloaded to the new location.
- setup(university_index: int, download_location: Path, min_year: int | None = None) None [source]
Setup the university information.
- property university_index
BlackboardDownload
BlackboardDownload, mass download all user content from Blackboard
- class blackboard_sync.download.BlackboardDownload(sess: BlackboardSession, download_location: Path, last_downloaded: datetime | None = None, data_sources: list[str] = [], min_year: int | None = None)[source]
Blackboard download job.
BlackboardDownload constructor
Download all files in blackboard recursively to download_location, only if they have been altered since specified datetime
Keyword arguments:
- Parameters:
sess (BlackboardSession) – UCLan BB user session
download_location ((str / Path)) – Where files will be stored
last_downloaded (str) – Files modified before this will not be downloaded
data_sources – List of valid data sources
min_year – Only courses created on or after this year will be downloaded
- _create_desktop_link(path: Path, url: str, comment: str = '') None [source]
Creates a platform-aware internet shortcut
- _handle_file(content: BBCourseContent, parent_path: Path, course_id: str, depth: int = 0) None [source]
Download BBContent recursively, depending on filetype