|
|
Show a one-line weather forecast on the desktop
Using curl:
curl -s http://www.wunderground.com/cgi-bin/findweather/getForecast?query=12345 | awk '/Today is/ || /Tomorrow is/' | textutil -convert txt -stdin -stdout -format htm'textutil' converts the 'html' output to 'text'. It is a very versatile command. Modifying the 'awk' command allows it to handle both 'Today' and 'Tomorrow' conditions Both 'curl' and 'textutil' are included with Mac OS X
Show a one-line weather forecast on the desktop
-format html, not -format htm -- the latter kicks back "invalid input format".
Show a one-line weather forecast on the desktop
Yes, sorry, it was a typo. The "
l" in "html" must have gotten dropped while playing around with formatting. klaus has displayed it correctly along with piping it to growl.
Show a one-line weather forecast on the desktop
If you have Growl and growlnotify installed try this, adapted from above:
curl -s http://www.wunderground.com/cgi-bin/findweather/getForecast?query=12345 | awk '/Today is/ || /Tomorrow is/' | textutil -convert txt -stdin -stdout -format html | growlnotify
Show a one-line weather forecast on the desktop
When I run the script (with 'html') all I get is "Error reading -stdin" |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.06 seconds |
|