Aslan11 / wilos-cli

What's it like outside?

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

W.I.L.O.S. CLI

What's It Like Out Side? - A weather tool for all the coders living in dark caves.

Install

Note:

Currently supports Linux, Mac OS X, NetBSD and FreeBSD.

You'll need a free API key from developer.forecast.io.

Set your forecast.io API key in an environment variable WILOS_CLI_FORECAST_API_TOKEN

For example:

export WILOS_CLI_FORECAST_API_TOKEN="<YOUR_API_TOKEN>"

If you want to use the --loc flag and conveniently search by a location string you'll need a Google Maps Geocoding API key.

Which you can get by clicking on the Get A Key button on this page.

Set your Google Maps API key in an environment variable WILOS_CLI_GOOGLE_API_TOKEN

For example:

export WILOS_CLI_GOOGLE_API_TOKEN="<YOUR_API_TOKEN>"

Install via pip

$ pip install wilos-cli

Build from source

$ git clone git@github.com:aslan11/wilos-cli.git
$ cd wilos-cli
$ python setup.py install

You can set the API key using an environment variable as shown above or create a file config.py in the wilos package directory (wilos/config.py) with a few lines

config = {
    "WILOS_CLI_FORECAST_API_TOKEN": "<YOUR_FORECAST_API_TOKEN>",
    "WILOS_CLI_GOOGLE_API_TOKEN": "<YOUR_GOOGLE_API_TOKEN>",
}

Usage

Get Weather for a latitude and longitude (Requires Forecast.io Key)

$ wilos --lat=19.8968 --lon=155.5828 # weather for Hawaii
"======== What's it like outside Hawaii, USA? ========"
   ____                                  __
  / __ \_   _____  ______________ ______/ /_       .--.
 / / / / | / / _ \/ ___/ ___/ __ `/ ___/ __/     .(    ).-.
/ /_/ /| |/ /  __/ /  / /__/ /_/ (__  ) /_      (___.__(   ).
\____/ |___/\___/_/   \___/\__,_/____/\__/            (___(__)

Get Weather for a location (Requires Forecast.io and Google Key)

$ wilos --loc='Los Angeles' # weather for LA
"======== What's it like outside Los Angeles, CA, USA? ========"

   ________                    \  |  /
  / ____/ /__  ____ ______       .-.
 / /   / / _ \/ __ `/ ___/    ‒ (   ) ‒
/ /___/ /  __/ /_/ / /           `-᾿
\____/_/\___/\__,_/_/          /  |  \

Help

$ wilos --help

License

Open sourced under MIT License

Support

If you like my work and you're in LA, let's grab a beer and talk tech. Feel free to open up PR's with features, I'll be adding more when I find time to.

About

What's it like outside?

License:MIT License


Languages

Language:Python 100.0%