brianriley / weather-cli Goto Github PK
View Code? Open in Web Editor NEWGet current weather conditions at your command line
License: BSD 2-Clause "Simplified" License
Get current weather conditions at your command line
License: BSD 2-Clause "Simplified" License
Hi,
Can it be to put a parameter to indicate degrees in Celsius;
Thanks !!!
Good job !!!
See: http://en.wikipedia.org/wiki/Celsius
It's celsius
not ``celcius`
Add a WEATHER_OPTS
that the weather
CLI respects as default options to be passed.
e.g:
export WEATHER_OPTS="--units celsius"
The app fails to get the weather data, since open weather map now requires an API key. They are free.
I don't know python well, but I'm sure I can muddle my way through it given some time to sort out the changes; once I get there I'll make a PR, unless someone else beats me to it.
Here's the error.
Traceback (most recent call last):
File "/usr/local/bin/weather", line 6, in <module>
Weather.main()
File "/usr/local/lib/python2.7/site-packages/weathercli.py", line 146, in main
conditions = weather_provider.now(args['query'], args['units'])
File "/usr/local/lib/python2.7/site-packages/weathercli.py", line 50, in now
units
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 87, in urlopen
return opener.open(url)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 213, in open
return getattr(self, name)(url)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 364, in open_http
return self.http_error(url, fp, errcode, errmsg, headers)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 377, in http_error
result = method(url, fp, errcode, errmsg, headers)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 689, in http_error_401
errcode, errmsg, headers)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/urllib.py", line 386, in http_error_default
raise IOError, ('http error', errcode, errmsg, headers)
IOError: ('http error', 401, 'Unauthorized', <httplib.HTTPMessage instance at 0x10764a878>)
For example, "It's 10 °C and broken clouds" instead of just "It's 10° and broken clouds".
Hi, nice program you have here, unfortunately it overwrote the weather script from expect on my machine (Slackware 14.1, 64 bits). Said script also exists on CentOS 5/6/7.
Is there any chance of renaming your installed script to /usr/bin/weathercli, for example?
TIA.
I installed weathercli through pip on Ubuntu 12.10 using Python 2.7.3.
Seemingly no matter what area code I enter (tried 90210, 11219, 07603, 10001), I get the error in this issue's title.
Any idea what might be going wrong?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.