Skip to content

Calculates "discomfort index" of the current location.

License

Notifications You must be signed in to change notification settings

kv5h/discomfort_index

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discomfort_index

Calculates "Discomfort Index (a.k.a temperature–humidity index (THI))" of the current location based on IP address.

Prerequisite

Weather data is obtained via Weather API | www.weatherapi.com.

So you need to export API key as below:

export WEATHERAPI_API_KEY=*******************

Run

Available via:

# cf.) Options
http://localhost:18080/di

Output example:

{
    "city": "Tokyo",
    "feeling": "Hot a little",
    "humidity": 84,
    "index": 78.6112,
    "temperature": 27
}

Options

Alternatively, you can overwrite some parameter.

Usage of ./discomfort_index:
  -apipath string
    	API path (default "/di")
  -ipaddress string
    	IP Address
  -port string
    	Port (default "18080")

About

Calculates "discomfort index" of the current location.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages