From: Mischa POSLAWSKY Date: Wed, 15 Dec 2010 21:47:44 +0000 (+0100) Subject: browser: rename usage metadata keys X-Git-Tag: v1.4~4 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/09716a4fe69eb9e6a6197196d6f290db9be1a6d2?hp=0466f0c92a59e94455c8d149c3c84c39b315e2c6 browser: rename usage metadata keys More logical naming after recent changes, before anyone starts using it. --- diff --git a/browser.plp b/browser.plp index fbbddde..6c06a2e 100644 --- a/browser.plp +++ b/browser.plp @@ -88,8 +88,9 @@ given ($get{usage} // 'wm') { break; }; $usage = $_; - my $ref = $canihas->{-source} || 'unknown'; - $ref = sprintf '%s', $_, $ref for $canihas->{-url} || (); + my $ref = $canihas->{-title} || 'unknown'; + $ref = sprintf '%s', $_, $ref + for $canihas->{-site} || $canihas->{-source} || (); $ref .= " $_" for $canihas->{-date} || (); print "\nwith $ref browser usage statistics"; } diff --git a/tools/convert-stats-gs.pl b/tools/convert-stats-gs.pl index c28fde8..7514659 100644 --- a/tools/convert-stats-gs.pl +++ b/tools/convert-stats-gs.pl @@ -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; { diff --git a/tools/convert-stats-wikimedia.pl b/tools/convert-stats-wikimedia.pl index 5c6a8bf..382fe0c 100755 --- a/tools/convert-stats-wikimedia.pl +++ b/tools/convert-stats-wikimedia.pl @@ -4,8 +4,8 @@ our %count; our $mobile; if (m{} .. m{}) { - $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; }