browser: rename usage metadata keys
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:47:44 +0000 (22:47 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 23:44:33 +0000 (00:44 +0100)
More logical naming after recent changes, before anyone starts using it.

browser.plp
tools/convert-stats-gs.pl
tools/convert-stats-wikimedia.pl

index fbbddde372511b65a08f7053fd65e95dedcc4fc1..6c06a2eb5745e53dc26a140ddae27510cf6aadc2 100644 (file)
@@ -88,8 +88,9 @@ given ($get{usage} // 'wm') {
                break;
        };
        $usage = $_;
-       my $ref = $canihas->{-source} || 'unknown';
-       $ref = sprintf '<a href="%s">%s</a>', $_, $ref for $canihas->{-url} || ();
+       my $ref = $canihas->{-title} || 'unknown';
+       $ref = sprintf '<a href="%s">%s</a>', $_, $ref
+               for $canihas->{-site} || $canihas->{-source} || ();
        $ref .= " $_" for $canihas->{-date} || ();
        print "\nwith $ref browser usage statistics";
 }
index c28fde8d0a8bdc5028f0012c86332b1ec7bbb482..751465907f30a0ea478a445c9d10f219ef4bef05 100644 (file)
@@ -20,7 +20,7 @@ my %BROWSERID = qw(
 );
 
 my %count = (
-       -source => 'StatCounter',
+       -title  => 'StatCounter',
        -site   => 'http://gs.statcounter.com/',
 );
 
@@ -36,7 +36,7 @@ if (@ARGV) {
        my $site = $count{-site};
        $site .= 'chart.php?'.join('&', map "$_=$param{$_}", keys %param);
        $site .= '&statType_hidden=';
-       $count{-url} = $site;
+       $count{-source} = $site;
 
        require LWP::Simple;
        {
index 5c6a8bf32770c50977104cf2a53af3157e1d38ae..382fe0c122cbde51ecad58a06e3baea19d309b20 100755 (executable)
@@ -4,8 +4,8 @@ our %count;
 our $mobile;
 
 if (m{<td class=hl>} .. m{</?td>}) {
-       $count{-url} = 'http://stats.wikimedia.org/archive/squid_reports/';
-       $count{-source} = 'Wikimedia';
+       $count{-source} = 'http://stats.wikimedia.org/archive/squid_reports/';
+       $count{-title } = 'Wikimedia';
        $count{-date} = $1 if m{ period: (?:\d+ )?(\w+ \d+) };
        next;
 }