Auto check in via GitHub Actions
ATTENTION: Be sure to submit screenshots yourself in the Campus Today app starting May 6, or you will submit screenshots from the previous day.
-
Fixed bug unable to check in
-
Use previous check in address instead of
address
variableSince
address
variable removed, you should get detailed address by GPS at least once, or youraddress
will be your current district
-
Fork this repository
-
To enable workflow, click
Actions
-Workflows
-Python application
-Enable workflow
-
To add your information, click
Settings
-Secrets
-New Secrets
and add the following secretsusername
- Your student ID, 10 numbers in generalpassword
- Your password for one.hfut.edu.cn
To check the action's status, click Actions
- Workflows
- All workflows
and enter the lastest workflow run. Then you can see the status in build
- Run code
To disable GitHub Actions' notifications(both email and web), click your avatar, then go to Settings
- Notifications
- Actions
and uncheck Email
and Web
ATTENTION: You should enable the workflow manually if there hasn't been activity for at least 60 days
-
Click
Code
-Download ZIP
on the repository page -
(If you do not have an Aliyun account, please register first) Enter the Aliyun function console
-
Click on
Services and Functions
and create a service -
Click
Create function
, selectCreate from scratch
, and modify the configuration as followsRunning Environment
:Python 3.9
Function trigger method
:Triggered by event request
instance type
:flex instance
Memory Specifications
:128 MB
Trigger Type
:Timed Trigger
Trigger method
:custom
CRON expression
:0 10 6,7,8,9,10,11,12 * * *
-
Upload the
hfut-check-in-main.zip
downloaded in step1
to the cloud function IDE explorer -
Type
unzip hfut-check-in-main.zip
in the cloud function IDE terminal and execute it. At this time, thehfut-check-in-main
folder should appear in the cloud function IDE resource manager -
Move the
utils
folder andrequirements.txt
in thehfut-check-in-main
folder to the same directory asindex.py
-
Type
pip3 install -t . -r requirements.txt
in the terminal and execute -
Modify the contents of
index.py
as followsfrom utils.HFUT import main def handler(event, context): main() if __name__ == "__main__": main()
-
Use any of the following methods to configure the information
-
Click
Function Configuration
, fill inusername
,password
in the environment variable column. -
Create a new
config.json
in the cloud function IDE resource manager and configure it according to the following template{ "username": "", "password": "" }
-
ATTENTION: There is no free quota for public network outbound traffic of Aliyun Function Compute. For detailed billing, please refer to Public Network Outbound Traffic
- Use WebVPN
- Remove
address
variable - Prompt wrong password
- More formal log output