Permalink
Browse files

Make all scripts actually output copyrightlogo

For now, they all will be returning empty strings, which will be made to give
no logo.  However, it will be enforced that they return the string (just like
copyright)
  • Loading branch information...
Beirdo committed Jul 14, 2012
1 parent a640d37 commit 114d4cdc58194b0c53fa7426b2edcbcee9433be3
@@ -28,8 +28,8 @@
my $name = 'ENVCAN';
my $version = 0.5;
-my $author = 'Joe Ripley';
-my $email = 'vitaminjoe@gmail.com';
+my $author = 'Joe Ripley / Gavin Hurlbut';
+my $email = 'vitaminjoe@gmail.com / gjhurlbu@gmail.com';
my $updateTimeout = 15*60;
my $retrieveTimeout = 30;
my @types = ('cclocation', 'station_id', 'copyright',
@@ -133,6 +133,8 @@
print CACHE Data::Dumper->Dump([\%results], ['*results']);
}
+$results{'copyrightlogo'} = "none";
+
# do some quick conversions
if ($units eq "ENG") {
$results{'temp'} = int(((9/5) * $results{'temp'}) + 32);
@@ -156,7 +158,6 @@
} else {
$results{'wind_spdgst'} = sprintf("%.2f (%.2f)", $results{'wind_speed'}, $results{'wind_gust'});
}
-
foreach my $key (sort (keys %results)) {
print "$key". "::";
@@ -166,4 +167,3 @@
print $results{$key} ."\n";
}
}
-
@@ -30,9 +30,9 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d);
my $name = 'ENVCAN-Animated-Map';
-my $version = 0.4;
-my $author = 'Joe Ripley';
-my $email = 'vitaminjoe@gmail.com';
+my $version = 0.5;
+my $author = 'Joe Ripley / Gavin Hurlbut';
+my $email = 'vitaminjoe@gmail.com / gjhurlbu@gmail.com';
my $updateTimeout = 10*60;
my $retrieveTimeout = 30;
my @types = ('amdesc', 'updatetime', 'animatedimage', 'copyright',
@@ -129,3 +129,4 @@
print "updatetime::Last Updated on " .
UnixDate("now", "%b %d, %I:%M %p %Z") . "\n";
print "copyright::Environment Canada\n";
+print "copyrightlogo::none\n";
@@ -31,7 +31,7 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d);
my $name = 'ENVCAN-Static-Map';
-my $version = 0.2;
+my $version = 0.3;
my $author = 'Gavin Hurlbut';
my $email = 'gjhurlbu@gmail.com';
my $updateTimeout = 10*60;
@@ -125,3 +125,4 @@
print "updatetime::Last Updated on " .
UnixDate("now", "%b %d, %I:%M %p %Z") . "\n";
print "copyright::Environment Canada\n";
+print "copyrightlogo::none\n";
@@ -19,7 +19,7 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d, $opt_D);
my $name = 'yrno-XML';
-my $version = 0.3;
+my $version = 0.4;
my $author = 'Gavin Hurlbut';
my $email = 'gjhurlbu@gmail.com';
my $updateTimeout = 15*60;
@@ -149,6 +149,7 @@
foreach $node ($nodeset->get_nodelist) {
$attrib{"copyright"} = $node->getAttribute("text");
}
+$attrib{"copyrightlogo"} = "none";
my $tzoffset;
$nodeset = $xp->find('/weatherdata/location/timezone');
@@ -26,7 +26,7 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d, $opt_D);
my $name = 'BBC-Current-XML';
-my $version = 0.4;
+my $version = 0.5;
my $author = 'Gavin Hurlbut / Stuart Morgan';
my $email = 'gjhurlbu@gmail.com / stuart@tase.co.uk';
my $updateTimeout = 120*60;
@@ -115,13 +115,13 @@
}
# The required elements which aren't provided by this feed
-printf "appt::NA\n";
-
-printf "copyright::bbc.co.uk - ©2012 BBC\n";
-printf "station_id::" . $locid . "\n";
+print "appt::NA\n";
+print "copyright::bbc.co.uk - ©2012 BBC\n";
+print "copyrightlogo::none\n";
+print "station_id::" . $locid . "\n";
my $location = $xml->{channel}->{title};
$location =~ s/.*?Observations for (.*)$/$1/s;
-printf "cclocation::" . $location . "\n";
+print "cclocation::" . $location . "\n";
my $item_title = $xml->{channel}->{item}->{title};
@@ -26,7 +26,7 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d, $opt_D);
my $name = 'BBC-3day-XML';
-my $version = 0.4;
+my $version = 0.5;
my $author = 'Gavin Hurlbut / Stuart Morgan';
my $email = 'gjhurlbu@gmail.com / stuart@tase.co.uk';
my $updateTimeout = 360*60; # 6 Hours
@@ -115,12 +115,13 @@
die "Not xml";
}
-printf "copyright::bbc.co.uk - ©2012 BBC\n";
-printf "station_id::" . $locid . "\n";
+print "copyright::bbc.co.uk - ©2012 BBC\n";
+print "copyrightlogo::none\n";
+print "station_id::" . $locid . "\n";
my $location = $xml->{channel}->{title};
$location =~ s/.*?Forecast for (.*)$/$1/s;
-printf "3dlocation::" . $location . "\n";
-printf "updatetime::Updated " . localtime() . "\n";
+print "3dlocation::" . $location . "\n";
+print "updatetime::Updated " . localtime() . "\n";
my $i = 0;
my $item;
@@ -22,9 +22,9 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d);
my $name = 'NDFD-6_day';
-my $version = 0.5;
-my $author = 'Gavin Hurlbut & Lucien Dunning';
-my $email = 'gjhurlbu@gmail.com';
+my $version = 0.6;
+my $author = 'Gavin Hurlbut / Lucien Dunning';
+my $email = 'gjhurlbu@gmail.com / ldunning@gmail.com';
my $updateTimeout = 15*60;
my $retrieveTimeout = 30;
my @types = ('3dlocation', '6dlocation', 'updatetime',
@@ -152,8 +152,8 @@
printf "updatetime::Last Updated on %s\n",
UnixDate($creationdate, "%b %d, %I:%M %p %Z");
-
-printf "copyright::National Digital Forecast Database\n";
+print "copyright::National Digital Forecast Database\n";
+print "copyrightlogo::none\n";
foreach $time (sort(keys(%$result))) {
my $date;
@@ -18,9 +18,9 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d);
my $name = 'NDFD-18_Hour';
-my $version = 0.4;
-my $author = 'Gavin Hurlbut & Lucien Dunning';
-my $email = 'gjhurlbu@gmail.com';
+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 = ('18hrlocation', 'updatetime',
@@ -142,7 +142,8 @@
my $icon;
printf "updatetime::Last Updated on %s\n",
UnixDate($creationdate, "%b %d, %I:%M %p %Z");
-printf "copyright::National Digital Forecast Database\n";
+print "copyright::National Digital Forecast Database\n";
+print "copyrightlogo::none\n";
my $pop12;
foreach my $time (sort keys %$result) {
if (defined $result->{$time}->{'probability-of-precipitation_12 hour'}) {
@@ -141,9 +141,9 @@ sub getEffectiveWarnings {
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d);
my $name = 'NWS-Alerts';
-my $version = 0.5;
-my $author = 'Gavin Hurlbut & Lucien Dunning';
-my $email = 'gjhurlbu@gmail.com';
+my $version = 0.6;
+my $author = 'Gavin Hurlbut / Lucien Dunning';
+my $email = 'gjhurlbu@gmail.com / ldunning@gmail.com';
my $updateTimeout = 10*60;
my $retrieveTimeout = 30;
my @types = ('swlocation', 'updatetime', 'alerts', 'copyright',
@@ -225,6 +225,7 @@ sub getEffectiveWarnings {
print "updatetime::Last Updated at $updatetime\n";
print "copyright::NOAA, National Weather Service\n";
+print "copyrightlogo::none\n";
sub doLocation {
my $code = shift;
@@ -18,9 +18,9 @@
our ($opt_v, $opt_t, $opt_T, $opt_l, $opt_u, $opt_d);
my $name = 'NWS-XML';
-my $version = 0.5;
-my $author = 'Gavin Hurlbut & Lucien Dunning';
-my $email = 'gjhurlbu@gmail.com';
+my $version = 0.6;
+my $author = 'Gavin Hurlbut / Lucien Dunning';
+my $email = 'gjhurlbu@gmail.com / ldunning@gmail.com';
my $updateTimeout = 15*60;
my $retrieveTimeout = 30;
my @types = ('cclocation', 'station_id', 'latitude', 'longitude',
@@ -86,6 +86,8 @@
my $response = get $url;
die unless defined $response;
+print "copyrightlogo::none\n";
+
my $xml = XMLin($response);
foreach (@types) {
my $label;

0 comments on commit 114d4cd

Please sign in to comment.