jdotjdot / bashweather Goto Github PK
View Code? Open in Web Editor NEWA Bash script to add regularly updated localized weather icons to your bash prompt
License: MIT License
A Bash script to add regularly updated localized weather icons to your bash prompt
License: MIT License
Per this StackOverflow question, the rainy umbrella causes terminal to behave weirdly when going past the end of the line due to it actually requiring two characters in Unicode.
Need to remove the rainy umbrella and replace with normal umbrella, as well as investigate if the other characters do this as well.
Finally, should replace the characters with escaped sequences in the code.
Got this error when trying to invoke the script like this:
./bashweather.sh -l "London, UK"
The space character between the comma and UK seems to be the culprit here.
No matter what city I try, I can't seem to get WEATHERCHAR set to anything other than the default. For reference, the response for "London,UK" today is:
{"coord":{"lon":-0.13,"lat":51.51},"sys":{"type":1,"id":5091,"message":0.5896,"country":"GB","sunrise":1417160409,"sunset":1417190223},"weather":[{"id":721,"main":"Haze","description":"haze","icon":"50d"}],"base":"cmc stations","main":{"temp":284.35,"pressure":1003,"humidity":81,"temp_min":283.15,"temp_max":285.15},"wind":{"speed":5.7,"deg":80},"clouds":{"all":0},"dt":1417190071,"id":2643743,"name":"London","cod":200}
I tried debugging a bit, but gave up after I realised that I don't know quite how you interpret the OpenWeatherMap API responses (and I don't have the inclination to read it now :-) )
Per title, rather than RunLocateMe as default.
Hy Everyone,
I'm trying to add this to a script I'm building to control the weather in my region and add to database.
After download the file I've created a file but I cannot see the data.
Here is my file:
/var/www/scripts/BashWeather.sh -l "London,UK"
myvars=$WEATHERCHAR
echo $myvars
Can someone help me?
Thank You
Raffaele Colleo
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.