HKO_CMD
A python command line program to retrieve Hong Kong Observary's weather data.
Usage
$ python3 hko.py -h
usage: hko.py [-h] [-c | -n | -a | -l LOCATION | -f FORECAST | -s]
[-v VERBOSE] [-o {xml,json}]
optional arguments:
-h, --help show this help message and exit
-c, --complete show current HKO weather and all location weather.
-n, --now show current HKO weather.
-a, --all-location show all locations' weather.
-l LOCATION, --location LOCATION
show specific location's current weather. shows all no
location name specific.
-f FORECAST, --forecast FORECAST
show upcoming [1-9] days forecast.
-s, --server start a flask server for serving json and xml (Go to
http://127.0.0.1:5000 for description)
-v VERBOSE, --verbose VERBOSE
show debug message
-o {xml,json}, --output {xml,json}
output as selected file format
Work In Process
- Parsing Forecast data [Done]
- Getting location-specific current weather [Done]
- Add debug message for
-v
- Add
-s
for serving json and xml with Flask [Done] - Add current weather alerts
- Better json data type instead of using strings
- Cache mechanism - only download/retrieve new weather data after period of time