Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Automated extraction of NOAA weather satellite images

by Scott7477 (Chaplain)
on May 30, 2007 at 13:51 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://618179]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-25 15:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found