(.*)<\/strong><\/p>/; my $a_title = $1;
@$r[0] =~ /<\/p><\/div> (.*)<\/p><\/div>/; my $a_description = $1; # unexciting, no?
# look for per-player achievements.
for (my $col = 1; $col <= 2; $col++) {
if (@$r[$col] =~ /xbcDisplayDate/) {
@$r[$col] =~ / (\d+) The below contains a listing of all Xbox 360 achievements attained by
gamertag Morbus Iff
Else. It was created
by a Perl script from Morbus Iff which scans downloaded achievement lists
from Xbox.com (how you actually download them is up to you). Currently, the
Xbox Community
Developer Program is not accepting new tools, nor does it provide this
type of data at the API level (or so I'm told).<\/div>/; my $a_tile = $1;
@$r[$col] =~ /<\/div>
{$gtcol[$col]}->{$game}) { next; }
my $time = timegm(0, $5, $4, $2, $1, $3); # store in epoch UTC.
push (@achievements, {
description => HTML::Entities::decode($a_description),
game => HTML::Entities::decode($game),
gamertag => $gtcol[$col],
points => $a_points,
tile_url => $a_tile,
tile_file => $a_tile =~ /http:\/\/tiles.xbox.com\/tiles\/..\/..\/(.*)/,
title => HTML::Entities::decode($a_title),
time => $time,
time_f => strftime "%a %b %e %H:%M:%S %Y", gmtime($time),
});
}
}
}
}
# record games already processed.
$processed->{$gtcol[1]}->{$game}++;
$processed->{$gtcol[2]}->{$game}++;
}
# sort our achievements by date.
@achievements = sort { $b->{'time'} <=> $a->{'time'} } @achievements;
print <
Xbox 360 Game Achievements
";
EVIL_HEREDOC_HEADER_OF_ORMS_BY_GORE
foreach my $achievement (@achievements) {
if ($achievement->{'gamertag'} ne 'Morbus Iff Else') { next; }
unless (-e "x360a_tiles/$achievement->{tile_file}") {
# store the tiles locally so we don't leech of xbox.com.
getstore($achievement->{'tile_url'}, "x360a_tiles/$achievement->{tile_file}");
}
print "Game Tile Points Achievement Date \n";
} print "$achievement->{game} ";
print " ";
print "{tile_file}\" />
$achievement->{points} ";
print "$achievement->{title} ";
print "
$achievement->{description}". strftime("%Y-%m-%d %H:%M:%S", gmtime($achievement->{'time'})) ."