@ -399,7 +399,7 @@ The JSON format is a feature providing access to *wttr.in* data through an easy-
To fetch information in JSON format, use the following syntax:
$ curl wttr.in/Detroit?format=j1
curl wttr.in/Detroit?format=j1
This will fetch information on the Detroit region in JSON format. The j1 format code is used to allow for the use of other layouts for the JSON output.
@ -447,7 +447,7 @@ The [Prometheus](https://github.com/prometheus/prometheus) Metrics format is a f
To fetch information in Prometheus format, use the following syntax:
$ curl wttr.in/Detroit?format=p1
curl wttr.in/Detroit?format=p1
This will fetch information on the Detroit region in Prometheus Metrics format. The `p1` format code is used to allow for the use of other layouts for the Prometheus Metrics output.
@ -478,17 +478,17 @@ The result will look something like the following:
wttr.in can also be used to check the phase of the Moon. This example shows how to see the current Moon phase
in the full-output mode:
$ curl wttr.in/Moon
curl wttr.in/Moon
Get the moon phase for a particular date by adding `@YYYY-MM-DD`:
$ curl wttr.in/Moon@2016-12-25
curl wttr.in/Moon@2016-12-25
The moon phase information uses [pyphoon](https://github.com/chubin/pyphoon) as its backend.
To get the moon phase information in the online mode, use `%m`:
$ curl wttr.in/London?format=%m
curl wttr.in/London?format=%m
🌖
Keep in mind that the Unicode representation of moon phases suffers 2 caveats:
@ -515,7 +515,7 @@ wttr.in supports multilingual locations names that can be specified in any langu
The query string should be specified in Unicode (hex-encoded or not). Spaces in the query string
must be replaced with `+`:
$ curl wttr.in/станция+Восток
curl wttr.in/станция+Восток
Weather report: станция Восток
Overcast
@ -535,11 +535,11 @@ The language can be set explicitly when using console clients by using command-l
The preferred language can be forced using the `lang` option:
$ curl wttr.in/Berlin?lang=de
curl wttr.in/Berlin?lang=de
The third option is to choose the language using the DNS name used in the query:
$ curl de.wttr.in/Berlin
curl de.wttr.in/Berlin
wttr.in is currently translated into 54 languages, and the number of supported languages is constantly growing.
@ -582,8 +582,8 @@ wttr.in has the following external dependencies:
After you install [golang](https://golang.org/doc/install), install `wego`:
$ go get -u github.com/schachmat/wego
$ go install github.com/schachmat/wego
go get -u github.com/schachmat/wego
go install github.com/schachmat/wego
### Install Python dependencies
@ -605,13 +605,13 @@ You can install most of them using `pip`.
Some python package use LLVM, so install it first:
$ apt-get install llvm-7 llvm-7-dev
apt-get install llvm-7 llvm-7-dev
If `virtualenv` is used:
$ virtualenv -p python3 ve
$ ve/bin/pip3 install -r requirements.txt
$ ve/bin/python3 bin/srv.py
virtualenv -p python3 ve
ve/bin/pip3 install -r requirements.txt
ve/bin/python3 bin/srv.py
Also, you need to install the geoip2 database.
You can use a free database GeoLite2 that can be downloaded from (http://dev.maxmind.com/geoip/geoip2/geolite2/).
@ -622,7 +622,7 @@ If you want to use the IP2location service for IP-addresses that are not covered
you have to obtain a API key of that service, and after that save into the `~/.ip2location.key` file: