/[rrd-simple-monitoring]/bin/gametrust-services.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /bin/gametrust-services.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (hide annotations)
Thu Jul 16 18:48:19 2009 UTC (14 years, 9 months ago) by dpavlin
File MIME type: text/plain
File size: 607 byte(s)
import upstream http://rrd.me.uk/rrd-simple-monitoring.tar.gz

without prerequisities

1 dpavlin 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    

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26