NUS-HTD
A command-line tool to make and view your daily health declarations at National University of
Singapore (NUS).
How to build
Clone the reposiotry and run:
go build
then copy the generated executable to somewhere in your $PATH.
NUSNET ID and password can be supplied using either command-line arguments or from environment variables ($HTD_USERNAME
and $HTD_PASSWORD
).
usage: nus-htd [<flags>] <command> [<args> ...]
A command-line tool for making and viewing your daily health declarations at NUS.
Flags:
--help Show context-sensitive help (also try --help-long and --help-man).
-u, --username=USERNAME Your NUSNET ID. (default: $HTD_USERNAME.)
-p, --password=PASSWORD Your NUSNET password. (default: $HTD_PASSWORD)
--debug Print the received command line arguments and flag and immediately exit.
Commands:
help [<command>...]
Show help.
declare [<flags>] <am or pm>
Declare your health status. (d for short)
view
View your past declarations. (v for short)
For example,
To pass username and password on the command-line:
nus-htd d[eclare] -u USERNAME -p PASSWORD am 36.5
nus-htd v[iew] -u USERNAME -p PASSWORD
Alternatively, if you have set the environment variables, simply run:
nus-htd d[eclare] am 36.5
nus-htd v[iew]
Why did I write this
- To explore Golang's HTTP client
- To write a small CLI tool in Golang
- To save a few clicks when declaring my health status
Credits
License
MIT