Document #364 in README.md
This commit is contained in:
parent
b030ceaa43
commit
b9526f8a67
1 changed files with 43 additions and 28 deletions
71
README.md
71
README.md
|
|
@ -17,10 +17,10 @@ You can access the service from a shell or from a Web browser like this:
|
||||||
Weather for City: Paris, France
|
Weather for City: Paris, France
|
||||||
|
|
||||||
\ / Clear
|
\ / Clear
|
||||||
.-. 10 – 11 °C
|
.-. 10 – 11 °C
|
||||||
― ( ) ― ↑ 11 km/h
|
― ( ) ― ↑ 11 km/h
|
||||||
`-’ 10 km
|
`-’ 10 km
|
||||||
/ \ 0.0 mm
|
/ \ 0.0 mm
|
||||||
|
|
||||||
|
|
||||||
Here is an actual weather report for your location (it's live!):
|
Here is an actual weather report for your location (it's live!):
|
||||||
|
|
@ -56,7 +56,7 @@ results of looking up the location:
|
||||||
|
|
||||||
Location: Vostok Station, станция Восток, AAT, Antarctica [-78.4642714,106.8364678]
|
Location: Vostok Station, станция Восток, AAT, Antarctica [-78.4642714,106.8364678]
|
||||||
Location: Tour Eiffel, 5, Avenue Anatole France, Gros-Caillou, 7e, Paris, Île-de-France, 75007, France [48.8582602,2.29449905432]
|
Location: Tour Eiffel, 5, Avenue Anatole France, Gros-Caillou, 7e, Paris, Île-de-France, 75007, France [48.8582602,2.29449905432]
|
||||||
Location: Kilimanjaro, Northern, Tanzania [-3.4762789,37.3872648]
|
Location: Kilimanjaro, Northern, Tanzania [-3.4762789,37.3872648]
|
||||||
|
|
||||||
You can also use IP-addresses (direct) or domain names (prefixed with `@`) to specify a location:
|
You can also use IP-addresses (direct) or domain names (prefixed with `@`) to specify a location:
|
||||||
|
|
||||||
|
|
@ -132,34 +132,34 @@ The result will look something like the following:
|
||||||
{
|
{
|
||||||
"current_condition": [
|
"current_condition": [
|
||||||
{
|
{
|
||||||
"FeelsLikeC": "25",
|
"FeelsLikeC": "25",
|
||||||
"FeelsLikeF": "76",
|
"FeelsLikeF": "76",
|
||||||
"cloudcover": "100",
|
"cloudcover": "100",
|
||||||
"humidity": "76",
|
"humidity": "76",
|
||||||
"observation_time": "04:08 PM",
|
"observation_time": "04:08 PM",
|
||||||
"precipMM": "0.2",
|
"precipMM": "0.2",
|
||||||
"pressure": "1019",
|
"pressure": "1019",
|
||||||
"temp_C": "22",
|
"temp_C": "22",
|
||||||
"temp_F": "72",
|
"temp_F": "72",
|
||||||
"uvIndex": 5,
|
"uvIndex": 5,
|
||||||
"visibility": "16",
|
"visibility": "16",
|
||||||
"weatherCode": "122",
|
"weatherCode": "122",
|
||||||
"weatherDesc": [
|
"weatherDesc": [
|
||||||
{
|
{
|
||||||
"value": "Overcast"
|
"value": "Overcast"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"weatherIconUrl": [
|
"weatherIconUrl": [
|
||||||
{
|
{
|
||||||
"value": ""
|
"value": ""
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"winddir16Point": "NNE",
|
"winddir16Point": "NNE",
|
||||||
"winddirDegree": "20",
|
"winddirDegree": "20",
|
||||||
"windspeedKmph": "7",
|
"windspeedKmph": "7",
|
||||||
"windspeedMiles": "4"
|
"windspeedMiles": "4"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
...
|
...
|
||||||
|
|
||||||
Most of these values are self-explanatory, aside from `weatherCode`. The `weatherCode` is an enumeration which you can find at either [the WorldWeatherOnline website](https://www.worldweatheronline.com/developer/api/docs/weather-icons.aspx) or [in the wttr.in source code](https://github.com/chubin/wttr.in/blob/master/lib/constants.py).
|
Most of these values are self-explanatory, aside from `weatherCode`. The `weatherCode` is an enumeration which you can find at either [the WorldWeatherOnline website](https://www.worldweatheronline.com/developer/api/docs/weather-icons.aspx) or [in the wttr.in source code](https://github.com/chubin/wttr.in/blob/master/lib/constants.py).
|
||||||
|
|
@ -323,6 +323,21 @@ Get the Moon phase for a particular date by adding `@YYYY-MM-DD`:
|
||||||
|
|
||||||
The Moon phase information uses [pyphoon](https://github.com/chubin/pyphoon) as its backend.
|
The Moon phase information uses [pyphoon](https://github.com/chubin/pyphoon) as its backend.
|
||||||
|
|
||||||
|
Unicode representation of moonphases suffers 2 caveats:
|
||||||
|
|
||||||
|
- With some fonts, the representation `🌘` is ambiguous, for it either seem
|
||||||
|
almost-shadowed or almost-lit, depedending on whether your terminal is in
|
||||||
|
light mode or dark mode. Relying on colored fonts like `noto-fonts` works
|
||||||
|
around this problem.
|
||||||
|
|
||||||
|
- The representation `🌘` is also ambiguous, for it means "last quarter" in
|
||||||
|
northern hemisphere, but "first quarter" in souther hemisphere. It also means
|
||||||
|
nothing in tropical zones. This is a limitation that
|
||||||
|
[Unicode](https://www.unicode.org/L2/L2017/17304-moon-var.pdf) is aware about.
|
||||||
|
But it has not been worked around at `wttr.in` yet.
|
||||||
|
|
||||||
|
See #364 for corresponding tracking issue. Any help is welcome.
|
||||||
|
|
||||||
## Internationalization and localization
|
## Internationalization and localization
|
||||||
|
|
||||||
wttr.in supports multilingual locations names that can be specified in any language in the world
|
wttr.in supports multilingual locations names that can be specified in any language in the world
|
||||||
|
|
@ -359,13 +374,13 @@ The third option is to choose the language using the DNS name used in the query:
|
||||||
|
|
||||||
wttr.in is currently translated into 54 languages, and the number of supported languages is constantly growing.
|
wttr.in is currently translated into 54 languages, and the number of supported languages is constantly growing.
|
||||||
|
|
||||||
See [/:translation](http://wttr.in/:translation) to learn more about the translation process,
|
See [/:translation](http://wttr.in/:translation) to learn more about the translation process,
|
||||||
to see the list of supported languages and contributors, or to know how you can help to translate wttr.in
|
to see the list of supported languages and contributors, or to know how you can help to translate wttr.in
|
||||||
in your language.
|
in your language.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
To install the application:
|
To install the application:
|
||||||
|
|
||||||
|
|
@ -404,7 +419,7 @@ If you want to get weather reports as PNG files, you'll also need to install:
|
||||||
* pyte (>=0.6)
|
* pyte (>=0.6)
|
||||||
* necessary fonts
|
* necessary fonts
|
||||||
|
|
||||||
You can install most of them using `pip`.
|
You can install most of them using `pip`.
|
||||||
|
|
||||||
If `virtualenv` is used:
|
If `virtualenv` is used:
|
||||||
|
|
||||||
|
|
@ -430,7 +445,7 @@ because the MaxMind database is pretty good).
|
||||||
### Get a WorldWeatherOnline key and configure wego
|
### Get a WorldWeatherOnline key and configure wego
|
||||||
|
|
||||||
To get a WorldWeatherOnline API key, you must register here:
|
To get a WorldWeatherOnline API key, you must register here:
|
||||||
|
|
||||||
https://developer.worldweatheronline.com/auth/register
|
https://developer.worldweatheronline.com/auth/register
|
||||||
|
|
||||||
After you have a WorldWeatherOnline key, you can save it into the
|
After you have a WorldWeatherOnline key, you can save it into the
|
||||||
|
|
@ -438,7 +453,7 @@ WWO key file: `~/.wwo.key`
|
||||||
|
|
||||||
Also, you have to specify the key in the `wego` configuration:
|
Also, you have to specify the key in the `wego` configuration:
|
||||||
|
|
||||||
$ cat ~/.wegorc
|
$ cat ~/.wegorc
|
||||||
{
|
{
|
||||||
"APIKey": "00XXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
"APIKey": "00XXXXXXXXXXXXXXXXXXXXXXXXXXX",
|
||||||
"City": "London",
|
"City": "London",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue