Monster 2 in the App Store
Feb 27th 2010trentgUncategorized
Now that Monster RPG 2 is in the App Store, I get to relax a little, but not too much. I get to finish up some side projects and things, and soon get working on our new Top Sekrit project.
On a related note, I wrote a very short perl script for making the downloadable daily sales reports from iTunes Connect readable. Here it is:
$headers = <STDIN>;
chomp($headers);
@headers_a = split(/\t/, $headers);
@values = {};
my $i = 0;
while ($line = <STDIN>) {
chomp($line);
@values[$i] = $line;
$i++;
}
@totals = {};
for ($i = 0; $i < $#values; $i++) {
@values_a = split(/\t/, $values[$i]);
for ($j = 0; $j < @values_a; $j++) {
if ($values_a[$j] =~ m/^[0-9].*/) {
$totals[$j] += $values_a[$j];
}
else {
$totals[$j] = "XX";
}
}
}
my $final = "";
for ($i = 0; $i < $#values; $i++) {
for ($j = 0; $j < @totals; $j++) {
$final = "${final}${totals[$j]}\t";
}
}
@values_a = split(/\t/, $final);
for ($i = 0; $i < @headers_a; $i++) {
if ($headers_a[$i] =~ m/Units.*/) {
print "$headers_a[$i] -- $values_a[$i]\n";
}
}
Leave a Reply
You must be logged in to post a comment.