Skip to content

Script to easily submit your body temperature to NUS's temperature declaration system

Notifications You must be signed in to change notification settings

chrisgzf/nus-temp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

NUS Temperature Declaration Script

This is a python port of this script to easily submit your temperature to NUS's temperature declaration system.

How to download

$ git clone https://github.com/chrisgzf/nus-temp
$ cd nus-temp
$ python declare.py

OR just download declare.py using your web-browser and run it.

How to use

To run the script, simply run:

$ python declare.py

On your first run, you will set-up your NUSNET credentials.

On your subsequent runs, running this script will immediately submit a randomly-generated temperature. Please note that this is only for testing! Do submit your actual temperature with

$ python declare.py <your temp here>

To see what options there are, run:

$ python declare.py -h

The options that are available are:

usage: declare.py [-h] [-v] [-t TIME] [-s SYM] [TEMP]

Submits NUS temperature declaration

positional arguments:
  TEMP                  temperature you would like to declare. leave blank for random (default: 36.3)

optional arguments:
  -h, --help                   show this help message and exit
  -v, --verbose                verbose - enable debug messages (default: False)
  -t TIME, --time TIME         time of day - 'A' or 'P'. defaults to current time (default: A)
  -s SYM, --sym SYM            whether you have symptoms - 'Y' or 'N'. defaults to no (default: N)
  -f FAMSYM, --famsym FAMSYM   whether someone in the same household with symptoms - 'Y' or 'N'. defaults to no (default: N)

Disclaimer

  1. This script stores your NUSNET credentials in plaintext in a file called creds.txt. If you are uncomfortable with your credentials being stored in such a manner, either (1) make a PR to implement a better way, or (2) don't use this.
  2. The aim of this tool is to make it fast and easy to submit your temperature declaration. You may have noticed that if you simply run python declare.py without any arguments, a random temperature is generated and submitted. This is only for testing purposes! Please do use this script as a means of helping you to submit your actual body temperature!
  3. This script works at the time of publishing this, but it is your onus to check if the right temperatures have been recorded on the portal. I will not be responsible if the script breaks, and you end up not submitting your temperature declaration on time.

Credits

Credits to @jiachen247 for writing the initial JavaScript version of the script.

About

Script to easily submit your body temperature to NUS's temperature declaration system

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages