Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^2: Automated extraction of NOAA weather satellite images

by Scott7477 (Chaplain)
on May 30, 2007 at 13:51 UTC ( #618179=note: print w/replies, xml ) Need Help??


in reply to Re: Automated extraction of NOAA weather satellite images
in thread Automated extraction of NOAA weather satellite images

Thanks for the feedback. I was looking at the POSIX module for including a timestamp in the saved filenames, but wanted to get a script up and running quickly and having never used the "strftime" function you mention Time::Tiny filled the bill. I agree with the potential problems you point out that the timestamps in my code have... I have updated my code to use the "strftime" function and the filenames now are very precise(for example "eastconusir20070530_074348.jpg"):
#NOAA updates the images on the GOES website every 30 minutes use strict; use LWP::Simple; use POSIX; my $image; my $url; my %images = ( "eastconusir" => "http://www.goes.noaa.gov/GIFS/ECIR.JPG", "eastconusvis" => "http://www.goes.noaa.gov/GIFS/ECVS.JPG", "eastconuswv" => "http://www.goes.noaa.gov/GIFS/ECWV.JPG", "westconusir" => "http://www.goes.noaa.gov/GIFS/WCIR.JPG", "westconusvis" => "http://www.goes.noaa.gov/GIFS/WCVS.JPG", "westconusvwv" => "http://www.goes.noaa.gov/GIFS/WCWV.JPG", ); my $timestring = strftime( "%Y%m%d_%H%M%S", localtime ); print $timestring."\n"; foreach my $key (keys %images) { print $key."\n"; print $images{$key}."\n"; my $status = getstore($images{$key},$key.$timestring.".jpg"); print $status."\n" ; };


Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://618179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2021-06-19 21:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (93 votes). Check out past polls.

    Notices?