Package: ktumon
KTU MonIntroductionKTU 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,AnanthaInstallation & UsageThe recommended way to install is through pipXGet pipX from pippython -m pip install --user pipxMake sure that pipX is on PATH by going to it's installed folderC:\Users\{USER_NAME}\AppData\Roaming\Python\Python3x\Scriptsand executingpipx ensurepathRestart the terminal and run pipX by typingpipxIf that didn't work, then manually add thepipx.exefile in the locationC:\Users\{USER_NAME}\AppData\Roaming\Python\Python3x\Scriptsto PATHAfter that you can install KTU Mon by typing the following into the terminalpipx install ktumonAfter installing, you can run it by typingktumonin 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 executablektumon.exefrom the locationC:\Users\{USER_NAME}\AppData\Roaming\Python\Python3x\Scriptsto the Startup folder.Press Windows logo key + R to open the Run prompt and typeshell:startupthis will open up the Startup folder. Paste in the shortcut of thektumon.exeexecutable 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 StuffThe 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 & ContributionIn 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 installvirtualenvfor that purposepipx install virtualenvThen within the cloned repository run the following command to create a virtual environmentvirtualenv venvAfter 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 onpip install -e .[dev]After making any changes to the code you can always run it whenever by executingktumonWhenever 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 packagespython -m build