Go to the source code of this file.
Functions | |
| use lib | dirname (abs_path($0 or $PROGRAM_NAME)) |
| our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d) | |
| getopts ('Tvtlu:d:') | |
| if (defined $opt_v) | |
| my ($latitude, $longitude) | |
| if (!(defined $opt_u &&defined $latitude &&defined $longitude &&$latitude ne""&&$longitude ne"")) | |
| if (open(CACHE,"$dir/ndfd18_cache_${latitude}_${longitude}")) | |
| if ($getData) | |
| printf updatetime::Last Updated on s | UnixDate ($creationdate,"%b %d, %I:%M %p %Z") |
| foreach my | $time (sort keys%$result) |
Variables | |
| use | strict |
| use | warnings |
| use | English |
| use Cwd | abs_path |
| use lib usr share mythtv mythweather scripts | us_nws |
| use | NDFDParser |
| use | NWSLocation |
| my | $name = 'NDFD-18_Hour' |
| my | $version = 0.5 |
| my | $author = 'Gavin Hurlbut / Lucien Dunning' |
| my | $email = 'gjhurlbu@gmail.com / ldunning@gmail.com' |
| my | $updateTimeout = 15*60 |
| my | $retrieveTimeout = 30 |
| my | types |
| my | $dir = './' |
| my | $icon_file = dirname(abs_path($0 or $PROGRAM_NAME)) . "/icons" |
| my | $locstr = shift |
| my | $units = $opt_u |
| my | $param |
| my | $d1 = UnixDate("now", "%O") |
| my | $d2 = UnixDate(DateCalc($d1, "+ 18 hours"), "%O") |
| my | $result |
| my | $creationdate |
| my | $nextupdate |
| my | $getData = 1 |
| my | $index = 0 |
| my | $icon |
| printf updatetime::Last Updated on s | n |
| my | $pop12 |
| our | ( | $ | opt_v, | |
| $ | opt_t, | |||
| $ | opt_T, | |||
| $ | opt_l, | |||
| $ | opt_u, | |||
| $ | opt_d | |||
| ) |
| getopts | ( | 'Tvtlu:d:' | ) |
| my | ( | $ | latitude, | |
| $ | longitude | |||
| ) |
| if | ( | ! | defined $opt_u &&defined $latitude &&defined $longitude &&$latitude ne""&&$longitude ne"" | ) |
| if | ( | open(CACHE,"$dir/ndfd18_cache_${latitude}_${longitude}") | ) |
| printf updatetime::Last Updated on s UnixDate | ( | $ | creationdate, | |
| "%b % | d, | |||
| %I:%M%p%Z" | ||||
| ) |
| use NDFDParser |
| use NWSLocation |
| my types |
('18hrlocation', 'updatetime', 'temp-0', 'temp-1', 'temp-2', 'temp-3', 'temp-4', 'temp-5', '18icon-0', '18icon-1', '18icon-2', '18icon-3', '18icon-4', '18icon-5', 'pop-0', 'pop-1', 'pop-2', 'pop-3', 'pop-4', 'pop-5', 'time-0', 'time-1', 'time-2', 'time-3', 'time-4', 'time-5', 'copyright', 'copyrightlogo')
| my $icon_file = dirname(abs_path($0 or $PROGRAM_NAME)) . "/icons" |
| my $param |
1.6.3