openweathermap: Access data at OpenWeatherMap

[ library, public-domain, web ] [ Propose Tags ]

Client library and command-line utility to access OpenWeatherMap https://openweathermap.org


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
cmd

Build a command-line utility.

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.0, 0.1.0, 0.2.0, 0.3.0
Change log ChangeLog.md
Dependencies aeson, base (>=4.9 && <5), directory, http-client, openweathermap, optparse-applicative (>=0.13.0.0), servant, servant-client (>=0.9), xdg-basedir [details]
License LicenseRef-PublicDomain
Copyright 2017, Igor Pashev <pashev.igor@gmail.com>
Author Igor Pashev
Maintainer Igor Pashev <pashev.igor@gmail.com>
Category Web
Source repo head: git clone https://github.com/ip1981/openweathermap.git
Uploaded by ip1981 at 2017-06-07T13:28:03Z
Distributions NixOS:0.3.0
Executables openweathermap
Downloads 1272 total (20 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-06-07 [all 1 reports]

Readme for openweathermap-0.0.0

[back to package description]

OpenWeatherMap

OpenWeatherMap is a haskell library to access https://openweathermap.org/api.

Requirements

OpenWeatherMap is written in Haskell with GHC. All required Haskell libraries are listed in openweathermap.cabal. Use 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 read the API key from the $XDG_CONFIG_HOME/openweathermap/key file, where $XDG_CONFIG_HOME 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