Go to the source code of this file.
Functions | |
| use lib | dirname (abs_path($0 or $PROGRAM_NAME)) |
| use lib | dirname ($0) |
| our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d, $opt_D) | |
| binmode (STDOUT,":utf8") | |
| if (!-d $logdir) | |
| getopts ('Tvtlu:d:') | |
| if (defined $opt_v) | |
| if (!(defined $opt_u &&defined $locid &&!$locid eq"")) | |
| if ($locid=~s/^(\d *)/$1/) | |
| if (!$xml) | |
| printf updatetime::Updated | localtime ()."\n" |
| foreach | $item (@{$xml->{channel}->{item}}) |
Variables | |
| use | strict |
| use | warnings |
| use | utf8 |
| use | English |
| use Cwd | abs_path |
| use lib usr share mythtv mythweather scripts | uk_bbc |
| use | BBCLocation |
| my | $name = 'BBC-3day-XML' |
| my | $version = 0.3 |
| my | $author = 'Gavin Hurlbut / Stuart Morgan' |
| my | $email = 'gjhurlbu@gmail.com / stuart@tase.co.uk' |
| my | $updateTimeout = 360*60 |
| my | $retrieveTimeout = 30 |
| my | types |
| my | $dir = "/tmp/uk_bbc" |
| my | $logdir = "/tmp/uk_bbc" |
| my | $locid = BBCLocation::FindLoc(shift, $dir, $updateTimeout, $logdir) |
| my | $units = $opt_u |
| my | $base_url |
| die unless defined | $response |
| my | $xml = XMLin($response) |
| printf copyright::From bbc co uk | n |
| my | $location = $xml->{channel}->{title} |
| my | $i = 0 |
| my | $item |
| use lib dirname | ( | $ | 0 | ) |
| our | ( | $ | opt_v, | |
| $ | opt_t, | |||
| $ | opt_T, | |||
| $ | opt_l, | |||
| $ | opt_u, | |||
| $ | opt_d, | |||
| $ | opt_D | |||
| ) |
| binmode | ( | STDOUT | , | |
| ":utf8" | ||||
| ) |
| if | ( | !-d $ | logdir | ) |
Definition at line 65 of file bbcthreedayxml.pl.
| getopts | ( | 'Tvtlu:d:' | ) |
| if | ( | defined $ | opt_v | ) |
Definition at line 82 of file bbcthreedayxml.pl.
| if | ( | ! | defined $opt_u &&defined $locid &&!$locid eq"" | ) |
Definition at line 90 of file bbcthreedayxml.pl.
| if | ( | $ | locid = ~ s/^(\d*)/$1/ |
) |
Definition at line 98 of file bbcthreedayxml.pl.
| if | ( | !$ | xml | ) |
Definition at line 113 of file bbcthreedayxml.pl.
| printf updatetime::Updated localtime | ( | ) |
Referenced by hdhomerun_debug_vprintf(), and localtime_r().
| foreach $item | ( | ) |
Definition at line 127 of file bbcthreedayxml.pl.
| use strict |
Definition at line 4 of file bbcthreedayxml.pl.
| use warnings |
Definition at line 5 of file bbcthreedayxml.pl.
| use encoding utf8 |
Definition at line 7 of file bbcthreedayxml.pl.
| use English |
Definition at line 9 of file bbcthreedayxml.pl.
| use Cwd abs_path |
Definition at line 12 of file bbcthreedayxml.pl.
Definition at line 14 of file bbcthreedayxml.pl.
| use BBCLocation |
Definition at line 24 of file bbcthreedayxml.pl.
| my $name = 'BBC-3day-XML' |
Definition at line 28 of file bbcthreedayxml.pl.
| my $version = 0.3 |
Definition at line 29 of file bbcthreedayxml.pl.
| my $author = 'Gavin Hurlbut / Stuart Morgan' |
Definition at line 30 of file bbcthreedayxml.pl.
| my $email = 'gjhurlbu@gmail.com / stuart@tase.co.uk' |
Definition at line 31 of file bbcthreedayxml.pl.
| my $updateTimeout = 360*60 |
Definition at line 32 of file bbcthreedayxml.pl.
| my $retrieveTimeout = 30 |
Definition at line 33 of file bbcthreedayxml.pl.
| my types |
('3dlocation', 'station_id', 'copyright', 'weather_icon', 'date-0', 'icon-0', 'low-0', 'high-0', 'date-1', 'icon-1', 'low-1', 'high-1', 'date-2', 'icon-2', 'low-2', 'high-2', 'updatetime')
Definition at line 34 of file bbcthreedayxml.pl.
| my $dir = "/tmp/uk_bbc" |
Definition at line 38 of file bbcthreedayxml.pl.
| my $logdir = "/tmp/uk_bbc" |
Definition at line 39 of file bbcthreedayxml.pl.
| my $locid = BBCLocation::FindLoc(shift, $dir, $updateTimeout, $logdir) |
Definition at line 89 of file bbcthreedayxml.pl.
| my $units = $opt_u |
Definition at line 94 of file bbcthreedayxml.pl.
| my $base_url |
'http: my $base_xml = '/Next3DaysRSS.xml'
Definition at line 95 of file bbcthreedayxml.pl.
| die unless defined $response |
Definition at line 108 of file bbcthreedayxml.pl.
| my $xml = XMLin($response) |
Definition at line 111 of file bbcthreedayxml.pl.
| printf:: $location n |
Definition at line 117 of file bbcthreedayxml.pl.
| $location = $xml->{channel}->{title} |
Definition at line 119 of file bbcthreedayxml.pl.
| my $i = 0 |
Definition at line 124 of file bbcthreedayxml.pl.
| my $item |
Definition at line 125 of file bbcthreedayxml.pl.
1.6.3