|
|
|
by Pawelziom93
|
|
|
#!/usr/bin/perl
@datepcs = split(/s+/, scalar localtime);
my $get = "";
my $filename = "";
my $numer = (int(substr(@datepcs[3], 0, 2) / 6) - 1) * 6;
my $dzien = @datepcs[2];
if ($numer < 0) {
$dzien = @datepcs[2] - 1;
$numer = "18";
}
elsif ($numer < 12) {
$numer = "0".$numer;
}
if ($dzien < 10) {
$dzien = "0".$dzien;
}
$get = "http://umold.meteo.pl/gpp/data/".@datepcs[4].@datepcs[1].$dzien."_".$numer."_row29_col13_pl.png";
$filename = @datepcs[4].@datepcs[1].$dzien."_".$numer."_row29_col13_pl.png";
system("wget ".$get);
system("mv ".$filename." Meteogram_Poznan.png");
system("eog Meteogram_Poznan.png");
system("rm -f Meteogram_Poznan.png"); |
|
|
|
|
|
|