National Geographic Background

I am posting the following as a bit of celebration after reading the decision discussed below.


NGM1997_08p116-7.jpg
National Geographic posts some incredible photographs for use as backgrounds on its Photo of the Day page along with instructions (for Windows and Mac only) on how to make the image your desktop background. The following script downloads the daily background to automate that task. If you need to convert the image, I suggest ImageMagick's wonderful collection of utilities.



#always use strict

use strict;

#for the getting of the page and image

use LWP::Simple;

#get the entry page and look for the link to the big background picture

(get("http://lava.nationalgeographic.com/cgi-bin/pod/PhotoOfTheDay.cgi") =~m!/pod/pictures/sm_wallpaper/(.+?jpg)!);

#store that big picture

getstore("http://lava.nationalgeographic.com/pod/pictures/lg_wallpaper/$1","back.jpg");


I've been using the script for a few months now and seeing a new national geographic picture every day has made me want to resubscribe to the magazine.

No comments: