Ticket #4954: scripts.diff

File scripts.diff, 2.9 KB (added by Torg, 16 years ago)

Patch for us_nws scripts

  • animaps.pl

    old new  
    11#!/usr/bin/perl -w
     2use lib '/usr/local/share/mythtv/mythweather/scripts/us_nws/';
    23use strict;
    34use Getopt::Std;
    45use LWP::Simple;
  • maps.pl

    old new  
    11#!/usr/bin/perl -w
     2use lib '/usr/local/share/mythtv/mythweather/scripts/us_nws/';
    23use strict;
    34use Getopt::Std;
    45use LWP::Simple;
  • ndfd18.pl

    old new  
    11#!/usr/bin/perl -w
     2use lib '/usr/local/share/mythtv/mythweather/scripts/us_nws/';
    23use strict;
    34use NDFDParser;
    45use NWSLocation;
     
    147148    $icon = $result->{$time}->{'conditions-icon_forecast-NWS'};
    148149    $icon =~ s/.*\/([a-z0-9_]+[.][j][p][g])/$1/;
    149150    local *FH;
    150     open(FH, "icons") or die "Cannot open icons";
     151    open(FH, "/usr/local/share/mythtv/mythweather/scripts/us_nws/icons") or die "Cannot open icons";
    151152    while(my $line = <FH>) {
    152153        if ($line =~ /${icon}::/) {
    153154            $line =~ s/.*:://;
  • ndfd.pl

    old new  
    11#! /usr/bin/perl -w
     2use lib '/usr/local/share/mythtv/mythweather/scripts/us_nws/';
    23
    34#TODO the icons aren't very meaningful, the server gives them to us for 3 or 6
    45# hr intervals, but since we're parsing for 12 hour, that seem a little useless
     
    188189            $icon = $result->{$iconkey}->{'conditions-icon_forecast-NWS'};
    189190            $icon =~ s/.*\/([a-z0-9_]+[.][j][p][g])/$1/;
    190191            local *FH;
    191             open(FH, "icons") or die "Cannot open icons";
     192            open(FH, "/usr/local/share/mythtv/mythweather/scripts/us_nws/icons") or die "Cannot open icons";
    192193            while(my $line = <FH>) {
    193194                if ($line =~ /${icon}::/) {
    194195                    $line =~ s/.*:://;
  • nws-alert.pl

    old new  
    11#!/usr/bin/perl -w
     2use lib '/usr/local/share/mythtv/mythweather/scripts/us_nws/';
    23package NWSAlert;
    34use strict;
    45use XML::Parser;
  • nwsxml.pl

    old new  
    11#! /usr/bin/perl -w
     2use lib '/usr/local/share/mythtv/mythweather/scripts/us_nws/';
    23
    34use strict;
    45use XML::Simple;
     
    116117        $key = 'weather_icon';
    117118        $xml->{$key} = 'unknown.png';
    118119        local *FH;
    119         open(FH, "icons") or die "Cannot open icons";
     120        open(FH, "/usr/local/share/mythtv/mythweather/scripts/us_nws/icons") or die "Cannot open icons";
    120121        while(my $line = <FH>) {
    121122            chomp $line;
    122123            if ($line =~ /$xml->{'icon_url_name'}::/) {