mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 10:40:06 -08:00
* update to pl script (added count output).
This commit is contained in:
parent
32699757c4
commit
ae8da01ba8
1 changed files with 7 additions and 2 deletions
|
|
@ -28,7 +28,6 @@ while(my $line = <DATA>) {
|
||||||
my @data = split('\\|', $line);
|
my @data = split('\\|', $line);
|
||||||
if ($data[1] eq $setName) {
|
if ($data[1] eq $setName) {
|
||||||
push(@setCards, \@data);
|
push(@setCards, \@data);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
close(DATA);
|
close(DATA);
|
||||||
|
|
||||||
|
|
@ -61,7 +60,8 @@ sub toCamelCase {
|
||||||
$string =~ s/[-,\s\']//g;
|
$string =~ s/[-,\s\']//g;
|
||||||
$string;
|
$string;
|
||||||
}
|
}
|
||||||
|
my $cardsFound = 0;
|
||||||
|
my $cardsImplemented = 0;
|
||||||
my $toPrint = '';
|
my $toPrint = '';
|
||||||
foreach my $card (sort cardSort @setCards) {
|
foreach my $card (sort cardSort @setCards) {
|
||||||
my $className = toCamelCase(@{$card}[0]);
|
my $className = toCamelCase(@{$card}[0]);
|
||||||
|
|
@ -71,8 +71,13 @@ foreach my $card (sort cardSort @setCards) {
|
||||||
$toPrint .= "\n";
|
$toPrint .= "\n";
|
||||||
}
|
}
|
||||||
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
$toPrint .= "@{$card}[2]|@{$card}[0]";
|
||||||
|
$cardsImplemented++;
|
||||||
}
|
}
|
||||||
|
$cardsFound = $cardsFound + 1;
|
||||||
}
|
}
|
||||||
|
print "Number of cards found for set " . $setName . ": " . $cardsFound . "\n";
|
||||||
|
print "Number of implemented cards: " . $cardsImplemented . "\n";
|
||||||
|
|
||||||
open CARD, "> " . lc($sets{$setName}) . "_implemented.txt";
|
open CARD, "> " . lc($sets{$setName}) . "_implemented.txt";
|
||||||
print CARD $toPrint;
|
print CARD $toPrint;
|
||||||
close CARD;
|
close CARD;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue