From 70050d5ad62b5156178e1b3b164cb67ba6ad57ce Mon Sep 17 00:00:00 2001 From: magenoxx Date: Tue, 30 Aug 2011 18:04:36 +0400 Subject: [PATCH] updated script --- Utils/extract_in_wiki_format.pl | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/Utils/extract_in_wiki_format.pl b/Utils/extract_in_wiki_format.pl index e6d8421c17..925adb15f6 100644 --- a/Utils/extract_in_wiki_format.pl +++ b/Utils/extract_in_wiki_format.pl @@ -35,13 +35,22 @@ while () { open REPORT, "> added_cards_in_wiki_format.txt"; print REPORT " * Added cards ($cards_count):\n"; foreach my $set (keys(%cards)) { - if (exists $knownSets{$set}) { - print REPORT " * $knownSets{$set}: "; - } else { - print REPORT " $set: "; + if ($set ne "tokens") { + if (exists $knownSets{$set}) { + print REPORT " * $knownSets{$set}: "; + } else { + print REPORT " $set: "; + } + my $first = 1; + foreach my $card (@{$cards{$set}}) { + if ($first == 0) { print REPORT ","; } + $card =~ s/([A-Z]{1}[a-z]+)/ $1/g; + $card =~ s/A Ether/ AEther/g; + print REPORT $card; + $first = 0; + } + print REPORT "\n"; } - foreach my $card (@{$cards{$set}}) { - print REPORT $card . ", "; - } - print REPORT "\n"; -} \ No newline at end of file +} + +close REPORT; \ No newline at end of file