Giter Site home page Giter Site logo

cli-mate's Introduction

PRs Welcome 

CLI-mate 🌅

Command Line application that gives you the weather info for a given city/place/address/airport code ☀️

usage

Install

npm install -g @jmt3559/cli-mate

On your terminal export these two environment variables:

Zsh

echo 'export MAPBOX=API_KEY' >>  ~/.zprofile

echo 'export WEATHERSTACK=API_KEY' >> ~/.zprofile

Bash

echo 'export MAPBOX=API_KEY' >>  ~/.bash_profile

echo 'export WEATHERSTACK=API_KEY' >> ~/.bash_profile

Get API Keys

Weatherstack - 1k free requests per month

Mapbox - 100K free requests

cli-mate's People

Contributors

aaronzshey avatar adripo avatar arpitvaghela avatar jmtellez avatar mkpath2015 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

cli-mate's Issues

Options order

Work on the order on how the location and units are passed. Order should not matter:

$ cli-mate Dallas --u=m
$ cli-mate --u=m Dallas

both should return the same output:

✔ Dallas, Texas, United States
Partly cloudy. It is currently 23°C, it feels like 24°C.

Error when API keys are not set

Following Error is thrown if API keys are not set in the environment variables
errifnoapikey

This can be solved by checking if process.env.WEATHERSTACK and process.env.MAPBOX exists

CONTRIBUTING.md

Work on CONTRIBUTING.md file to guide contributors in following rules and standards for this project.

Units Flag

Weather data is returned in Fahrenheit.
Add flag to pass desired units (check WeatherStack API for units)

Geolocation

When no command is passed, cli-mate should return weather data from where the user is located.

Add emojis to response

Pre-requisites:

Feature Description

Adding emojis to illustrate the weather description

Additional Details

node-emoji as reference

Cannot read property 'length' of undefined

➜  ~ cli-mate mcallen
⠸ Getting geocodes/usr/local/lib/node_modules/@jmt3559/cli-mate/utils/geocode.js:14
      } else if (body.features.length === 0) {
                               ^

TypeError: Cannot read property 'length' of undefined

Possible REST API parse error - I'll try to fix this, but put it out here so others can see it.
Edit: no, it was because I don't have a mapbox api key. We should specify that both api keys are required for cli-mate to function.

Update the README

Pre-requisites:

Feature Description

Please update the readme docs for us windows users. IDK HOW TO INSTALL!!!!!

Additional Details

Please.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.