Command line tool to printing weather info 🌦
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
index.js
package.json

README.md

Is it cloudy? 🌦

Node command line tool to printing weather info.

Bash prompt with weather info

Installation

npm install -g is-it-cloudy

Usage

  Usage: is-it-cloudy [options]

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -c, --city [city]      city name for weather info
    -a, --appid [id]       app id for openweathermap.org
    -f, --format [format]  format output, %e for emoji, %t for temp

Example

You can use this command to display weather in bash prompt.

Add next command to crontab to update status every 30 minutes:

0,30 * * * * /usr/local/bin/node /usr/local/bin/is-it-cloudy > ~/.is-it-cloudy

Add to your .profile file:

function set_ps1 {
  weather=$(cat ~/.is-it-cloudy);
  export PS1="${weather} \w\$"
}

export PROMPT_COMMAND="set_ps1;"

License

MIT