Hacker News new | ask | show | jobs
by peacelilly 3169 days ago
Checking the radar. In the midwest, weather comes at you from a long ways away, so I wrote a script to set my desktop background to be the current national radar mosaic every 15 minutes.

Explicitly setting the background programmatically was very unreliable in practice. The beauty of my script is that it simply wgets the image, checks if it is valid, resamples the image using a high quality algorithm (slow but worth it), places it in a folder, and deletes the old image.

My background preference is set to shuffle between images in that folder every minute, therefore my script acts like a pipeline.

3 comments

Do you mind sharing where you get the radar image from? I'm trying to do something similar so I can see how I should dress for my bike commute every morning. The only good/free one I have found is NOAA's RIDGE (http://www.srh.noaa.gov/jetstream/doppler/ridge_download.htm...) but it's low resolution and ugly.
I use the national base reflectivity radar.

https://radar.weather.gov/ridge/Conus/RadarImg/latest.gif

The "shuffle any image in this folder" background option in windows is incredibly cool and underutilized
I have a few dozen images in my folder... never thought of using it as a data feed like this. Awesome.
Using a folder as a queue is pretty common in the Linux world, moving files between them as well to make a pipeline.
Brilliant. I never know what to use for a background and usually keep a solid color. I’m stealing this.