Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antonmedv/is-it-cloudy
Command line tool to printing weather info 🌦
https://github.com/antonmedv/is-it-cloudy
bash cli nodejs
Last synced: about 1 month ago
JSON representation
Command line tool to printing weather info 🌦
- Host: GitHub
- URL: https://github.com/antonmedv/is-it-cloudy
- Owner: antonmedv
- Created: 2017-03-02T04:21:55.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-03-02T18:28:54.000Z (over 7 years ago)
- Last Synced: 2024-10-02T06:29:40.745Z (about 1 month ago)
- Topics: bash, cli, nodejs
- Language: JavaScript
- Homepage:
- Size: 4.88 KB
- Stars: 10
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Is it cloudy? 🌦
Node command line tool to printing weather info.
## Installation
```sh
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:
```sh
0,30 * * * * /usr/local/bin/node /usr/local/bin/is-it-cloudy > ~/.is-it-cloudy
```Add to your *.profile* file:
```sh
function set_ps1 {
weather=$(cat ~/.is-it-cloudy);
export PS1="${weather} \w\$"
}export PROMPT_COMMAND="set_ps1;"
```## License
MIT