This is a forked project from TFIP 2022.
- This project addresses a pain point in the Skillsfuture website we cannot have an overview of the attendance marked by students via Singpass QR.
- The webapp has a user interface which scraps some data from the class page to access an API call to skillsfuture.
- The information is stored in a local database (customisable by user) which then allows an overview of absent and present students.
- There is also an optional script which does the backend work and messages a whatspp group via pywhatkit.
Sien Long 26/Mar/2023
Contributors: Wang Zhiyuan, Lim Rong Yi, Lim Sien Long 2023
Note: All sensitive information has been removed.
The purpose of the project is to address the pain point we previously experienced, which was the difficulty in identifying who has not signed the attendance on the SSG website.
The existing code (as of 7 Mar 2023) is functional. Nonetheless, there are two/more limitations. First, it is a bit slow; second, there is no user interface, but just Python codes.
I encourage all the collaborators to make any improvements you see fit.
-- Zhiyuan, 7/Mar/2023, at DigiPen Singapore
Improvements:
- Used flask and bootstrap to create a user interface for the project.
- Modified the code to just use requests and access the api to return a json file, instead of selenium
- For ease of access, the webapp is hosted on pythonanywhere free hosting - however the hosting site does not allow selenium or requests to skillsfuture yet, requesting for them to whitelist the webpage.
- Changed to using sets to find the absentees. -- Sien Long 14/Mar/2023
- Migrated name list to off-site SQL database, credentials are in another file (config.py) -- Rong Yi 14/Mar/2023
Further improvements:
- Stored namelists in a local database instead of on-script, removed all sensitive information.
- Added an optional script to use pywhat to send whatsapp message instead, to update the classgroup. -- Sien Long 24/Mar/2023
Twilio:
- Added twilio features to create a whatsapp chatbot in Twilio sandbox using ngrok to access flask app.
- Tried out ngrok to host original flask app.
Telegram Bot:
- Migrated code to work in a telegram bot hosted on my Raspberry Pi.
- Added a countdown function to start of on-the-job-training.
Updates:
- Refactored code and updated scrapping call due to changes in WSG websites.
- Added Callback handler.
- Updated message formatting.
Personal updates:
- Added function to allow users to subcribe to personal updates if they are absent, done through DMing the bot so that it can save the chat.id into the database