Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New scheduling code, WeatherNOAA fixes, and documentation updates for DOORBIRD.pm and HARMON.pm. #629

Closed
wants to merge 11 commits into from
12 changes: 5 additions & 7 deletions bin/get_weather
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ Usage:

-city xxx => xxx is the City you want.
-state xxx => xxx is the State you want.
-zone xxx => xxx is the Zone (for forecast) you want.

-data xxx => xxx is either conditions, forecast, or all. Default is all.

Expand All @@ -76,10 +75,9 @@ eof
my ( $conditions, $forecast, %data );
my %config_parms;

$parms{city} = 'Rochester' unless $parms{city};
$parms{zone} = $parms{city} unless $parms{zone};
$parms{state} = 'MN' unless $parms{state};
$parms{data} = 'all' unless $parms{data};
$parms{city} = 'Rochester' unless $parms{city};
$parms{state} = 'MN' unless $parms{state};
$parms{data} = 'all' unless $parms{data};
$data{conditions}++ if $parms{data} eq 'all' or $parms{data} eq 'conditions';
$data{forecast}++ if $parms{data} eq 'all' or $parms{data} eq 'forecast';

Expand Down Expand Up @@ -110,9 +108,9 @@ if ( $data{conditions} ) {
}

if ( $data{forecast} ) {
print "Getting the forecast for $parms{zone}, $parms{state}\n";
print "Getting the forecast for $parms{city}, $parms{state}\n";
$forecast =
print_forecast( $parms{zone}, $parms{state}, undef, undef, undef, 1 );
print_forecast( $parms{city}, $parms{state}, undef, undef, undef, 1 );
$forecast =~ s/Geo::WeatherNOAA.pm .+\n//; # Drop geo version
#$forecast =~ s/\.\.\./\. /g;
$forecast =~ s/(\()(EDT|EST|CDT|CST|MDT|MST|PDT|PST)(\) *)//g;
Expand Down
Loading