diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2017-06-07 16:24:05 +0300 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2017-06-07 16:35:08 +0300 |
commit | 6f6e3d8ec76c59d6f403725e9b2a22b8f6680714 (patch) | |
tree | 45382bc0e03032ffa09b7b63afdc45e243e60f4f /README.md | |
download | openweathermap-6f6e3d8ec76c59d6f403725e9b2a22b8f6680714.tar.gz |
Initial version 0.0.00.0.0
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..ad4f07b --- /dev/null +++ b/README.md @@ -0,0 +1,57 @@ +OpenWeatherMap +============== + +OpenWeatherMap is a haskell library to access <https://openweathermap.org/api>. + +Requirements +============ + +OpenWeatherMap is written in Haskell with [GHC](http://www.haskell.org/ghc/). +All required Haskell libraries are listed in [openweathermap.cabal](ldapply.cabal). +Use [cabal-install](http://www.haskell.org/haskellwiki/Cabal-Install) to fetch +and build all pre-requisites automatically. + + +Command-line utility +==================== + +The command-line utility `openweathermap` provides a means +to get human readable weather infromation. + +Usage +----- + +``` +Usage: openweathermap ([-K|--api-key-file APIKEYFILE] | [-k|--api-key APIKEY]) + ((-c|--city CITY) | --lat NUM --lon NUM) [-d|--debug] + +Available options: + -K,--api-key-file APIKEYFILE + Read API key from this file + -k,--api-key APIKEY API key + -c,--city CITY City name + --lat NUM Latitude in decimal degrees + --lon NUM Longitude in decimal degrees + -d,--debug Enable debug + -h,--help Show this help text + +``` +By default, `openweathermap` reads the API key +from the `$XDG_CONFIG_HOME/openweathermap/key` file, where +[`$XDG_CONFIG_HOME`](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) +is typically `~/.config` on Linux systems. + + +Examples +-------- + +``` +$ openweathermap -c norilsk +Norilsk,RU (69.35°, 88.2°): Clouds, H 100 %, P 753 mmHg, T +4 °C, ↓ 1 m/s + +$ openweathermap --lat 55.7522200 --lon 37.6155600 +Moscow,RU (55.75°, 37.62°): Clear, H 45 %, P 762 mmHg, T +18..+21 °C, → 4 m/s +``` + + + |