GithubHelp home page GithubHelp logo

pizzimathy / cli-weather Goto Github PK

View Code? Open in Web Editor NEW
104.0 104.0 10.0 241 KB

Weather from the terminal.

Home Page: https://apizzimenti.github.io/cli-weather-docs

License: MIT License

JavaScript 100.00%

cli-weather's People

Contributors

danielruf avatar dvidsilva avatar ericasberry avatar pizzimathy avatar snollygolly avatar wevanscfi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cli-weather's Issues

Maximum call stack size exceeded on installation

I'm not being able to install, keep getting a "Maximum call stack size exceeded".

Has anyone experienced something similar?

I'm using node v.4.2.2 and npm v.3.5.2.

And, here are the last few lines of my npm-debug.log

11888 silly build [email protected]
11889 info linkStuff [email protected]
11890 silly linkStuff [email protected] has /usr/lib/node_modules/cli-weather/node_modules as its parent node_modules
11891 silly linkStuff [email protected] is part of a global install
11892 silly linkStuff [email protected] is installed into a global node_modules
11893 verbose linkBins [email protected]
11894 verbose linkMans [email protected]
11895 silly build [email protected]
11896 info linkStuff [email protected]
11897 silly linkStuff [email protected] has /usr/lib/node_modules as its parent node_modules
11898 silly linkStuff [email protected] is part of a global install
11899 silly linkStuff [email protected] is installed into a global node_modules
11900 silly linkStuff [email protected] is installed into the top-level global node_modules
11901 verbose linkBins [email protected]
11902 verbose link bins [ { weather: 'index.js' }, '/usr/bin', true ]
11903 verbose linkMans [email protected]
11904 silly gentlyRm /usr/bin/weather is being gently removed
11905 verbose stack RangeError: Maximum call stack size exceeded
11905 verbose stack at Array.filter (native)
11905 verbose stack at /usr/lib/node_modules/npm/lib/install/actions.js:55:37
11905 verbose stack at Array.forEach (native)
11905 verbose stack at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
11905 verbose stack at /usr/lib/node_modules/npm/lib/install/actions.js:57:7
11905 verbose stack at Array.forEach (native)
11905 verbose stack at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
11905 verbose stack at /usr/lib/node_modules/npm/lib/install/actions.js:57:7
11905 verbose stack at Array.forEach (native)
11905 verbose stack at markAsFailed (/usr/lib/node_modules/npm/lib/install/actions.js:54:16)
11906 verbose cwd /home/santiago
11907 error Linux 3.13.0-68-generic
11908 error argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "cli-weather" "-g"
11909 error node v4.2.2
11910 error npm v3.5.2
11911 error Maximum call stack size exceeded
11912 error If you need help, you may report this error at:
11912 error https://github.com/npm/npm/issues
11913 verbose exit [ 1, true ]

TypeError: Cannot read property 'black' of undefined

Trying to run
weather -c -s -z NG92PA

throws the following error

 e.message = "The file couldn't be written to - " + chalk.bgwhite.black("sudo") + " may be needed to" +

TypeError: Cannot read property 'black' of undefined
    at /usr/lib/node_modules/cli-weather/lib/tools/Files.js:23:77
    at fs.js:1305:7
    at FSReqWrap.oncomplete (fs.js:123:15)

Most likely because of the -s flag, as just running weather -c -z NG92PA works as expected

timeout http request on get weather data

So checking out the weather cli tool for kicks, and my internet deride half-way through the weather command, causing the terminal session to be frozen, preventing inputs while waiting for a response from the get. this is a minor thing, but thought I would drop it and say hi :).

love the project

Thanks

TypeError: min = Object.assign(min, re)

Running with options e.g. -z works. Saved those options with -s but subsequently running doesn't work with the following error:


/opt/boxen/nodenv/versions/v0.10.31/lib/node_modules/cli-weather/lib/weather/Config.js:40
        min = Object.assign(min, re);
                     ^
TypeError: Object function Object() { [native code] } has no method 'assign'
    at Object.config_weather (/opt/boxen/nodenv/versions/v0.10.31/lib/node_modules/cli-weather/lib/weather/Config.js:40:22)
    at Object.<anonymous> (/opt/boxen/nodenv/versions/v0.10.31/lib/node_modules/cli-weather/lib/index.js:8:9)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3```

TypeError: undefined is not a function

Installed per instructions, running Mac OSX Yosemite 10.10.5 and node v0.12.2.

Command: weather -a "Tampa, FL"

result:

/usr/local/lib/node_modules/cli-weather/lib/data.js:30
if (units.tmp.includes('C')) {
^
TypeError: undefined is not a function
at /usr/local/lib/node_modules/cli-weather/lib/data.js:30:23
at Array.forEach (native)
at Object.collectHighs (/usr/local/lib/node_modules/cli-weather/lib/data.js:26:10)
at new Format (/usr/local/lib/node_modules/cli-weather/lib/format.js:14:23)
at instance (/usr/local/lib/node_modules/cli-weather/lib/format.js:28:12)
at IncomingMessage. (/usr/local/lib/node_modules/cli-weather/lib/args.js:28:31)
at IncomingMessage.emit (events.js:129:20)
at _stream_readable.js:908:16
at process._tickCallback (node.js:355:11)

Error: Cannot find module '../../../private.json'

Hi there. Just installed your app on fedora with npm. Trying to run it and it gives me
`
module.js:471
throw err;
^

Error: Cannot find module '../../../private.json'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/usr/lib/node_modules/cli-weather/lib/weather/Data/Weather.js:15:9)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
`

(node:6145) DeprecationWarning - Buffer in node v7

The forecast continues to output correctly but prior to printing out I'm getting this node Buffer deprecation warning. FYI... This is with node v7.

(node:6145) DeprecationWarning: Using Buffer without `new` will soon stop working. Use `new Buffer()`, or preferably `Buffer.from()`, `Buffer.allocUnsafe()` or `Buffer.alloc()` instead.

If this helps, here are the results of node --trace-deprecation server

module.js:474
    throw err;
    ^

Error: Cannot find module '/Users/user/server'
    at Function.Module._resolveFilename (module.js:472:15)
    at Function.Module._load (module.js:420:25)
    at Module.runMain (module.js:607:10)
    at run (bootstrap_node.js:382:7)
    at startup (bootstrap_node.js:137:9)
    at bootstrap_node.js:497:3

Table starts from tomorrow?

Here's what I got:

image

My question is, why does the data in table start from Friday (while today is Thursday in my time zone)?

At first I think maybe it's because today's info is already displayed at top, but no the data at top is not of the same kind as the ones in the table at all.

Nobody is interested in today's high and low, and maybe precipitation probability?

SyntaxError: Unexpected token F in JSON at position 0

Not sure if this is a build failure within the program itself or on my end.

user @ ~ [1] โ†’ weather
powered by Forecast.io
  ##undefined:1
Forbidden
^

SyntaxError: Unexpected token F in JSON at position 0
    at Object.parse (native)
    at new Format (/usr/local/lib/node_modules/cli-weather/lib/format.js:9:20)
    at instance (/usr/local/lib/node_modules/cli-weather/lib/format.js:30:12)
    at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/cli-weather/lib/args.js:27:31)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:926:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Invalid config file name

Hi
thanks for your great app
but you must change

config = require('./lib/Config');

to

config = require('./lib/config');

Because unix based systems are case sensitive and the app not running on linux until I changed to name of config file

Not working on Debian

I installed cli-weather via npm.

I got 4 warnings, but nothing critical.

These are the results when I execute weather:

noneatme@noneatme:~$ sudo weather -z 90210
noneatme@noneatme:~$ sudo weather -a "Atlanta, GA"

Actually nothing happens.
noneatme@noneatme:~$ uname -a
Linux noneatme 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 GNU/Linux

Any ideas?

Retrieve weather using longitude and latitude coordinates

Love the update!!! I just wanted to point out to others that you can still retrieve weather using latitude & longitude coordinates. Quick example... weather -a 41.6627,-91.5549

@apizzimenti please consider updating the documentation to include lat,lon within the -a options usage description(s).

Hide unnecessary messages

The majority of the time people aren't interested in seeing when something in the background just works.. They are interested in the errors!

What I propose is to hide the first 3-4 lines that contain the checkmarks whenever something completes. These could be viewed by an additional argument -v or --verbose.

The steps where it says it is saving a location would still be useful to always have displayed along with any errors that occur.

Thoughts?

Zipcode support

I'm not sure if it makes a difference to the data source of your choice, but in some weather apps I've used, different zip codes within a city/county could result in completely different weather forecasts, like sunny here but stormy across the street.

Even if using zip code makes no improvement on accuracy, I find it easier to type in the zip code than the full name of the city.

CLI could be weather -zip 12345.

Make the Forecast.io API key configurable

Hi,

Thank you for sharing this nice project! ๐Ÿ‘

Looks like the API key for forecast.io is hardcoded. What if I want to use my own key? Any plan to make it configurable? I can open a pull request if you agree.

Kind regards
Mahmoud

--address is not working

This is what I get:

$ weather -c -a Dublin

    Error:
    No location parameter was provided.

    If you feel that this is an error in the application's programming and not with your internet connection, please submit an issue ticket at
    https://github.com/apizzimenti/cli-weather/issues

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.