From 19fe2aa4821938b77495dccceaf91f06bd7ac2e8 Mon Sep 17 00:00:00 2001 From: geniucker-dev Date: Mon, 15 Apr 2024 02:11:51 +0800 Subject: [PATCH] switch to submodule --- .github/workflows/build.yml | 4 +++- .gitmodules | 3 +++ zjuintl_assistant/.gitignore | 8 ++++++++ zjuintl_assistant/LICENSE | 21 +++++++++++++++++++++ zjuintl_assistant/README.md | 23 +++++++++++++++++++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 100644 zjuintl_assistant/.gitignore create mode 100644 zjuintl_assistant/LICENSE create mode 100644 zjuintl_assistant/README.md diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53abfcd..3622eac 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: - '**' paths: - '.github/workflows/build.yml' - - 'assistant/**' + - 'zjuintl_assistant/**' - 'main.py' - 'requirements.txt' workflow_call: @@ -30,6 +30,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + submodules: recursive - name: Setup Python uses: actions/setup-python@v5 diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..78bec24 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "zjuintl_assistant"] + path = zjuintl_assistant + url = https://github.com/ZJUIntl-share/zjuintl_assistant.git diff --git a/zjuintl_assistant/.gitignore b/zjuintl_assistant/.gitignore new file mode 100644 index 0000000..a828381 --- /dev/null +++ b/zjuintl_assistant/.gitignore @@ -0,0 +1,8 @@ +__pycache__ + +*.exe +*.build/ +*.dist/ +*.onefile-build/ + +config.yaml diff --git a/zjuintl_assistant/LICENSE b/zjuintl_assistant/LICENSE new file mode 100644 index 0000000..b7a89f2 --- /dev/null +++ b/zjuintl_assistant/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 ZJUIntl-share + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/zjuintl_assistant/README.md b/zjuintl_assistant/README.md new file mode 100644 index 0000000..0f7da69 --- /dev/null +++ b/zjuintl_assistant/README.md @@ -0,0 +1,23 @@ +# zjuintl_assistant + +## Features + +- [x] Get deadline of assignments from Blackboard +- [x] Get latest grades of assignments from Blackboard +- [x] Get latest announcements from Blackboard +- [ ] Get information from PeopleSoft. **I've not figured out how to do this yet. PRs and disscussions are welcome!** + +## Usage + +It's a package that contains a class `Assistant`, which provides abilities shown in [Features](#features). Dependencies are listed in `requirements.txt` in the same folder. + +For more details, please refer to [wiki](https://github.com/ZJUIntl-share/zjuintl_assistant/wiki) (WIP). + +## Development Notes + +This project is simply a spider that replay the requests of the browser. Login process of zjuam is based on package capture and reverse engineering of javascript code. However, the analysis of PeopleSoft is too difficult for me. So any help is welcome! I think possible difficulty is the management of cookies. + +## Credits + +- [ZJUintl-gRPC](https://github.com/QSCTech/ZJUintl-gRPC) +- [zju-learning-assistant](https://github.com/PeiPei233/zju-learning-assistant)