App to monitor notifications published by KTU
Project description
KTU Mon
Introduction
KTU Mon is an application that was developed as a desperate attempt at trying to get myself up to date with the recent notifications published by KTU.
Once upon a time I missed registering for few backlog exams because I put way too much trust in the elected UUC's of my college. I had hoped they would continue providing updates through their Instagram page, only to realize one day that they've deleted the whole damn account and I had missed my backlog exams.
Those UUC's were useless to say the least (ആരംഭ ശൂരത്വം മാത്രം).
Although I have dropped out from this University and no longer need the app, I have decided to add useless enhacements and publish this application as a package so that other students out there studying in KTU might find it useful.
Since this is Open Source code, you can try to understand the engineering behind this over-engineered webscraper and please feel free to post bugs, issue fixes, contribute improvements etc.
Thanks,
Anantha
Installation & Usage
The recommended way to install is through pipX
-
Get pipX from pip
python -m pip install --user pipx
-
Make sure that pipX is on PATH by going to it's installed folder
C:\Users\{USER_NAME}\AppData\Roaming\Python\Python3x\Scripts
and executingpipx ensurepath
-
Restart the terminal and run pipX by typing
pipx
-
If that didn't work, then manually add the
pipx.exe
file in the locationC:\Users\{USER_NAME}\AppData\Roaming\Python\Python3x\Scripts
to PATH -
After that you can install KTU Mon by typing the following into the terminal
pipx install ktumon
-
After installing, you can run it by typing
ktumon
in the terminal.It is recommended that you do not run it immediately. Instead set it up to make it run during startup and restart the system.
-
But inorder for the application to run at startup you'll need to add the executable
ktumon.exe
from the locationC:\Users\{USER_NAME}\AppData\Roaming\Python\Python3x\Scripts
to the Startup folder. -
Press Windows logo key + R to open the Run prompt and type
shell:startup
this will open up the Startup folder. Paste in the shortcut of thektumon.exe
executable in there. -
Now restart the system.
The first run would take some time to set up the local database and fetch the latest data from KTU, so please be patient. You'll be getting a desktop notification once the application has finished setting up.
Technical Stuff
The application runs as a system tray icon making use of Pystray. We use a local sqlite database for our database related stuff.
We spawn new threads to run the timer that checks for notifications at set intervals.
The application's Web GUI runs on Uvicorn ASGI Web Server with FastAPI as Web Framework using the Jinja2 Templating Engine and the frontend is completely made using Bootstrap CSS Framework.
The Pystray Process is used to spawn a new Process for running Uvicorn on demand. The spawned Uvicorn Process automatically opens up the default browser to show the Web GUI.
We use a WebSocket connection with the frontend to the backend to determine whether or not to terminate the spawned Uvicorn Process.
The spawned Uvicorn Process is terminated as soon as the User closes the Web GUI tab or the whole Browser itself.
Development & Contribution
In order to develop and contribute, fork this project and clone it to your local machine.
We use Visual Studio Code for development and recommend you to use it as well.
You should have Python 3.11 or above.
We recommennd working with a virtual environment to isolate the packages.
You can install virtualenv
for that purpose
pipx install virtualenv
Then within the cloned repository run the following command to create a virtual environment
virtualenv venv
After which change the interpreter within Visual Studio Code to point to the Python Interpreter contained within the created virtual environment.
Now create a new terminal in Visual Studio Code and you'll see that the virtual environement is activated.
You can see
(venv)
in the shell prompt of the terminal.
After which type in the following command to install an editable module of the project you are working on
pip install -e .[dev]
After making any changes to the code you can always run it whenever by executing ktumon
Whenever you are modifying the code, most of the time you won't have to rebuild and reinstall the editable module and that is the advantage of this approach.
Now you're all set!
The following command is used to build the distribution packages
python -m build
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ktumon-1.0.1.tar.gz
.
File metadata
- Download URL: ktumon-1.0.1.tar.gz
- Upload date:
- Size: 1.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 177134fae441d9e0212e55d741e626795bd350a58ccdb7413fcabab4a7c15c77 |
|
MD5 | fa60a10a259412935c3b5f19cf1da222 |
|
BLAKE2b-256 | e258c8c065623ffad6b6cd3b0ed38181e396c16f676ddfedf5c1d64ea4c457fb |
File details
Details for the file ktumon-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: ktumon-1.0.1-py3-none-any.whl
- Upload date:
- Size: 1.0 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7b58f9651e79f094fc3a626c32a9519706d07404dcac799c9ac5a165cd424da |
|
MD5 | 10e5a453ff5975866054a5b3ceed834e |
|
BLAKE2b-256 | b175b026148b5ed8cfd1ca4c9d55a58f923bfdb912918f5a8d4c854fb671cf79 |