1 |
#!/usr/bin/perl -w |
2 |
|
3 |
use strict; |
4 |
use GameTrust::Web::Stats::Parser; |
5 |
|
6 |
my $parser = new GameTrust::Web::Stats::Parser; |
7 |
my $feed = $parser->feed(feed => 'game'); |
8 |
my $time = time(); |
9 |
|
10 |
for my $brand ($feed->active_brands) { |
11 |
my $meta = $feed->brand_metadata($brand); |
12 |
next unless $meta->{usage} > 20; |
13 |
(my $brand_str = $meta->{displayname}) =~ s/[^\w\d]+//g; |
14 |
|
15 |
my $games = $feed->games($brand); |
16 |
while (my $game = $games->next) { |
17 |
printf("%d.gametrust.%s.game.%s %d\n", |
18 |
$time, |
19 |
lc($brand_str), |
20 |
$game->{id}, |
21 |
$game->{usage}, |
22 |
) if $game->{id} =~ |
23 |
/^([89]ball|snooker|chess|backgammon)$/; |
24 |
} |
25 |
} |
26 |
|
27 |
|