From ae8da01ba8bf12e7456e8fea6825aa21badeb4cd Mon Sep 17 00:00:00 2001 From: LevelX2 Date: Tue, 4 Feb 2014 17:43:18 +0100 Subject: [PATCH] * update to pl script (added count output). --- Utils/gen-list-implemented-cards-for-set.pl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Utils/gen-list-implemented-cards-for-set.pl b/Utils/gen-list-implemented-cards-for-set.pl index bdc34bb0a6..476d1b0fee 100644 --- a/Utils/gen-list-implemented-cards-for-set.pl +++ b/Utils/gen-list-implemented-cards-for-set.pl @@ -28,7 +28,6 @@ while(my $line = ) { my @data = split('\\|', $line); if ($data[1] eq $setName) { push(@setCards, \@data); - } } close(DATA); @@ -61,7 +60,8 @@ sub toCamelCase { $string =~ s/[-,\s\']//g; $string; } - +my $cardsFound = 0; +my $cardsImplemented = 0; my $toPrint = ''; foreach my $card (sort cardSort @setCards) { my $className = toCamelCase(@{$card}[0]); @@ -71,8 +71,13 @@ foreach my $card (sort cardSort @setCards) { $toPrint .= "\n"; } $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"; print CARD $toPrint; close CARD;