blackboardsync
Advanced tools
@@ -6,2 +6,3 @@ from textwrap import dedent | ||
| <head> | ||
| <title>{title}</title> | ||
| <meta name="viewport" | ||
@@ -8,0 +9,0 @@ content="width=device-width, initial-scale=1" /> |
@@ -85,4 +85,5 @@ """Loads and provides data about supported universities.""" | ||
| db = [] | ||
| db_file = Path(__file__).parent / UNIVERSITY_DB | ||
| with (Path(__file__).parent / UNIVERSITY_DB).open() as f: | ||
| with db_file.open(encoding='utf-8') as f: | ||
| db = json.load(f) | ||
@@ -89,0 +90,0 @@ |
@@ -25,3 +25,3 @@ # Copyright (C) 2024, Jacob Sánchez Pérez | ||
| from PyQt6.QtNetwork import QNetworkCookie | ||
| from PyQt6.QtWebEngineCore import QWebEngineCookieStore, QWebEngineProfile | ||
| from PyQt6.QtWebEngineCore import QWebEnginePage, QWebEngineProfile | ||
| from PyQt6.QtWebEngineWidgets import QWebEngineView | ||
@@ -33,2 +33,3 @@ | ||
| WATCHDOG_DELAY = 30 | ||
| PROFILE_STORAGE_NAME = "BlackboardLogin" | ||
@@ -61,3 +62,2 @@ | ||
| self.signals = self.Signals() | ||
| self._init_ui() | ||
@@ -73,6 +73,10 @@ | ||
| # Since Qt6 a persistent profile must be created manually | ||
| self.profile = QWebEngineProfile(PROFILE_STORAGE_NAME) | ||
| self.page = QWebEnginePage(self.profile) | ||
| self.web_view.setPage(self.page) | ||
| self.init_signals() | ||
| def init_signals(self) -> None: | ||
| profile, cookie_store = self.get_profile_and_cookie_store() | ||
| self.web_view.loadFinished.connect(self.slot_load_finished) | ||
@@ -82,5 +86,5 @@ self.home_button.clicked.connect(self.home) | ||
| self.help_button.clicked.connect(self.slot_help) | ||
| self.profile.clearHttpCacheCompleted.connect(self.slot_cache_cleared) | ||
| if profile is not None: | ||
| profile.clearHttpCacheCompleted.connect(self.slot_cache_cleared) | ||
| cookie_store = self.profile.cookieStore() | ||
| if cookie_store is not None: | ||
@@ -140,27 +144,15 @@ cookie_store.cookieAdded.connect(self.slot_cookie_added) | ||
| def clear_browser(self) -> None: | ||
| profile, cookie_store = self.get_profile_and_cookie_store() | ||
| cookie_store = self.profile.cookieStore() | ||
| if cookie_store is not None: | ||
| cookie_store.deleteAllCookies() | ||
| if profile is not None: | ||
| profile.clearHttpCache() | ||
| self.profile.clearHttpCache() | ||
| self._cookie_jar = RequestsCookieJar() | ||
| def get_profile_and_cookie_store( | ||
| self | ||
| ) -> tuple[QWebEngineProfile | None, QWebEngineCookieStore | None]: | ||
| page = self.web_view.page() | ||
| profile = None | ||
| cookie_store = None | ||
| def shutdown(self) -> None: | ||
| self.web_view.setPage(None) | ||
| # Should destroy underlying Qt Objects | ||
| del self.page | ||
| del self.profile | ||
| if page is not None: | ||
| profile = page.profile() | ||
| if profile is not None: | ||
| cookie_store = profile.cookieStore() | ||
| return (profile, cookie_store) | ||
| def cancel_watchdog(self) -> None: | ||
| if self.watchdog: | ||
@@ -167,0 +159,0 @@ self.watchdog.cancel() |
@@ -180,3 +180,3 @@ # Copyright (C) 2024, Jacob Sánchez Pérez | ||
| def slot_quit(self) -> None: | ||
| self.login_window.cancel_watchdog() | ||
| self.login_window.shutdown() | ||
| self.app.quit() | ||
@@ -183,0 +183,0 @@ |
@@ -674,2 +674,27 @@ [ | ||
| { | ||
| "name": "École Supérieure Privée d'Ingénierie et de Technologies", | ||
| "short_name": "ESPRIT", | ||
| "country": "TN", | ||
| "login": { | ||
| "start_url": "https://esprit.blackboard.com", | ||
| "target_url": "https://esprit.blackboard.com/ultra/" | ||
| }, | ||
| "api_url": "https://esprit.blackboard.com" | ||
| }, | ||
| { | ||
| "name": "Western Sydney University", | ||
| "short_name": "WSU", | ||
| "country": "AU", | ||
| "login": { | ||
| "start_url": "https://vuws.westernsydney.edu.au", | ||
| "target_url": "https://vuws.westernsydney.edu.au/ultra/" | ||
| }, | ||
| "network": { | ||
| "name": [ | ||
| "UWSNET" | ||
| ] | ||
| }, | ||
| "api_url": "https://vuws.westernsydney.edu.au" | ||
| }, | ||
| { | ||
| "name": "Fakeboard", | ||
@@ -676,0 +701,0 @@ "short_name": "dev", |
| Metadata-Version: 2.1 | ||
| Name: blackboardsync | ||
| Version: 0.17.5rc1 | ||
| Version: 0.18.0rc1 | ||
| Summary: Sync your blackboard content to your device | ||
@@ -52,5 +52,8 @@ Author-email: Jacob Sánchez <jacobszpz@protonmail.com> | ||
| <div align="center"> | ||
| <img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e" height="auto" width="75%" /> | ||
| <img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e" | ||
| height="auto" width="75%" /> | ||
| </div> | ||
| </br> | ||
| [Join the Matrix room to hear about updates, ask for help, and more!][matrix] | ||
@@ -112,3 +115,4 @@ ## About | ||
| <a href="https://flathub.org/apps/app.bbsync.BlackboardSync"> | ||
| <img alt="Download on Flathub" src="https://flathub.org/api/badge?svg&locale=en" width="200"/> | ||
| <img alt="Download on Flathub" | ||
| src="https://flathub.org/api/badge?svg&locale=en" width="200"/> | ||
| </a> | ||
@@ -123,3 +127,4 @@ | ||
| You will need to confirm the installation in `System Preferences > Security and Privacy`. | ||
| You can see the specific steps in the GIF below. After the program has been installed, you may eject the mounted disk. | ||
| You can see the specific steps in the GIF below. | ||
| After the program has been installed, you may eject the mounted disk. | ||
@@ -184,3 +189,4 @@ ![MacOSInstall][MacOSInstall] | ||
| This software is distributed under the [General Public License v2.0][license], more information available at the [Free Software Foundation][gnu]. | ||
| This software is distributed under the [General Public License v2.0][license], | ||
| more information available at the [Free Software Foundation][gnu]. | ||
@@ -194,3 +200,4 @@ | ||
| README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew], and [Rita Łyczywek][bulldogjob] | ||
| README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew], | ||
| and [Rita Łyczywek][bulldogjob] | ||
@@ -197,0 +204,0 @@ Flathub team for their quick work in approving the app :heart: |
+3
-0
@@ -12,2 +12,4 @@ # Changelog | ||
| - Body descriptions can be shared via WebShare or email | ||
| - Add support for École Supérieure Privée d'Ingénierie et de Technologies (@TheLime1) | ||
| - Add support for Western Sydney University (Jo Miyeon) | ||
@@ -19,2 +21,3 @@ ### Fixed | ||
| - Documentation build at readthedocs.org | ||
| - Login browser cache and cookie storage | ||
@@ -21,0 +24,0 @@ ### Changed |
+1
-1
@@ -12,3 +12,3 @@ [[source]] | ||
| pyqt6 = "==6.7.1" | ||
| setuptools = "==75.1.0" | ||
| setuptools = "==75.2.0" | ||
| pathvalidate = "==3.2.1" | ||
@@ -15,0 +15,0 @@ pydantic = "==2.9.2" |
+13
-6
| Metadata-Version: 2.1 | ||
| Name: blackboardsync | ||
| Version: 0.17.5rc1 | ||
| Version: 0.18.0rc1 | ||
| Summary: Sync your blackboard content to your device | ||
@@ -52,5 +52,8 @@ Author-email: Jacob Sánchez <jacobszpz@protonmail.com> | ||
| <div align="center"> | ||
| <img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e" height="auto" width="75%" /> | ||
| <img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e" | ||
| height="auto" width="75%" /> | ||
| </div> | ||
| </br> | ||
| [Join the Matrix room to hear about updates, ask for help, and more!][matrix] | ||
@@ -112,3 +115,4 @@ ## About | ||
| <a href="https://flathub.org/apps/app.bbsync.BlackboardSync"> | ||
| <img alt="Download on Flathub" src="https://flathub.org/api/badge?svg&locale=en" width="200"/> | ||
| <img alt="Download on Flathub" | ||
| src="https://flathub.org/api/badge?svg&locale=en" width="200"/> | ||
| </a> | ||
@@ -123,3 +127,4 @@ | ||
| You will need to confirm the installation in `System Preferences > Security and Privacy`. | ||
| You can see the specific steps in the GIF below. After the program has been installed, you may eject the mounted disk. | ||
| You can see the specific steps in the GIF below. | ||
| After the program has been installed, you may eject the mounted disk. | ||
@@ -184,3 +189,4 @@ ![MacOSInstall][MacOSInstall] | ||
| This software is distributed under the [General Public License v2.0][license], more information available at the [Free Software Foundation][gnu]. | ||
| This software is distributed under the [General Public License v2.0][license], | ||
| more information available at the [Free Software Foundation][gnu]. | ||
@@ -194,3 +200,4 @@ | ||
| README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew], and [Rita Łyczywek][bulldogjob] | ||
| README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew], | ||
| and [Rita Łyczywek][bulldogjob] | ||
@@ -197,0 +204,0 @@ Flathub team for their quick work in approving the app :heart: |
+12
-5
@@ -11,5 +11,8 @@ # BlackboardSync | ||
| <div align="center"> | ||
| <img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e" height="auto" width="75%" /> | ||
| <img src="https://github.com/sanjacob/BlackboardSync/assets/52013991/b7414212-034a-42a6-ab20-bb51394d885e" | ||
| height="auto" width="75%" /> | ||
| </div> | ||
| </br> | ||
| [Join the Matrix room to hear about updates, ask for help, and more!][matrix] | ||
@@ -71,3 +74,4 @@ ## About | ||
| <a href="https://flathub.org/apps/app.bbsync.BlackboardSync"> | ||
| <img alt="Download on Flathub" src="https://flathub.org/api/badge?svg&locale=en" width="200"/> | ||
| <img alt="Download on Flathub" | ||
| src="https://flathub.org/api/badge?svg&locale=en" width="200"/> | ||
| </a> | ||
@@ -82,3 +86,4 @@ | ||
| You will need to confirm the installation in `System Preferences > Security and Privacy`. | ||
| You can see the specific steps in the GIF below. After the program has been installed, you may eject the mounted disk. | ||
| You can see the specific steps in the GIF below. | ||
| After the program has been installed, you may eject the mounted disk. | ||
@@ -143,3 +148,4 @@ ![MacOSInstall][MacOSInstall] | ||
| This software is distributed under the [General Public License v2.0][license], more information available at the [Free Software Foundation][gnu]. | ||
| This software is distributed under the [General Public License v2.0][license], | ||
| more information available at the [Free Software Foundation][gnu]. | ||
@@ -153,3 +159,4 @@ | ||
| README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew], and [Rita Łyczywek][bulldogjob] | ||
| README templates/guide by [tonycrosby-tech][tonycrosby], [neildrew][neildrew], | ||
| and [Rita Łyczywek][bulldogjob] | ||
@@ -156,0 +163,0 @@ Flathub team for their quick work in approving the app :heart: |
+2
-0
@@ -181,2 +181,3 @@ # Universities | ||
| - Curtin University | ||
| - Western Sydney University | ||
@@ -190,2 +191,3 @@ ###### New Zealand | ||
| - University of Pretoria | ||
| - École Supérieure Privée d'Ingénierie et de Technologies | ||
@@ -192,0 +194,0 @@ If any information here seems wrong, please let me know in the issues. |
Sorry, the diff of this file is too big to display
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
655438
0.18%4904
0.47%