X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/24d8e7421e79afd514ce6b9035783e4231dabc84..d7726fe9d86267f50fe4129e53399d014aa7b4c0:/tools/convert-stats-wikimedia.pl
diff --git a/tools/convert-stats-wikimedia.pl b/tools/convert-stats-wikimedia.pl
index d65e5eb..5ee59ca 100644
--- a/tools/convert-stats-wikimedia.pl
+++ b/tools/convert-stats-wikimedia.pl
@@ -1,10 +1,19 @@
#!perl -n
use 5.010; use strict; use warnings;
our %count;
+our $mobile;
+
+if (m{
} .. m{?td>}) {
+ $count{-url} = 'http://stats.wikimedia.org/archive/squid_reports/';
+ $count{-source} = 'Wikimedia';
+ $count{-date} = $1 if m{ period: (?:\d+ )?(\w+ \d+) };
+ next;
+}
# select relevant columns
-/>Browser versions/ ... m{} && last or next;
+/>Browser versions(.*)/ ... m{} && last or next;
my ($tr, $id, $count2, $count) = split /(?:<[^>]*>)+/;
+$mobile = $count2 =~ /(? '2' ],
- [ '522' => '3' ],
- [ '525.013' => '3.1' ],
- [ '525.026' => '3.2' ],
- [ '526' => '4' ],
- [ '533' => '5' ],
- [ '534' => '5x' ],
+ $mobile ? (
+ [ '413' => '1' ],
+ [ '419' => '1.1' ],
+ [ '525' => '2' ],
+ [ '528' => '3' ],
+ [ '531' => '3.2' ],
+ [ '531.022' => '4.1' ],
+ [ '533' => '4.2' ],
+ [ '534' => '4x' ],
+ ) : (
+ [ '413' => '2' ],
+ [ '522' => '3' ],
+ [ '525.013' => '3.1' ],
+ [ '525.026' => '3.2' ],
+ [ '526' => '4' ],
+ [ '533' => '5' ],
+ [ '534' => '5x' ],
+ )
) {
last if $numversion lt $_->[0];
$version = $_->[1];
@@ -53,6 +78,9 @@ given ($browser) {
$browser = 'webkit_chr';
s/\.\d+$// for $version;
}
+ when ('Android') {
+ $browser = 'android';
+ }
s/\.0$// for $version;
}
|