added processing for todo list as well

This commit is contained in:
techdragon.nguyen@gmail.com
2011-02-04 13:41:24 +00:00
parent 767983631a
commit cab5a99833
6 changed files with 5012 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
There are a total of 6715 cards supported in this release.
There are a total of 7579 cards supported in this release.
__NOTOC__
<ul id="Top">

View File

@@ -1,8 +1,23 @@
#!/bin/perl
use Getopt::Std;
# declare the perl command line flags/options we want to allow
my %options=();
getopts("i:t:", \%options);
my $currentIndex = 0;
my %data;
while ( <> )
my %data = ();
my $outputFile = "cardList.html";
if ( $options{t} =~ /todo/i)
{
$outputFile = "todoList.html";
}
print "Processing $options{i}\n";
open INFILE, "<$options{i}" || die "$options{i} can't open for reading. $!\n";
while ( <INFILE> )
{
s/
//;
@@ -18,25 +33,26 @@ while ( <> )
{
push @{$data->{$currentIndex}}, $line;
}
}
close INFILE;
my @keys = sort keys %$data;
foreach (@keys)
{
my $cardCount = scalar @{$data->{$_}};
my $cardCount = scalar @{$data->{$_}};
# print $_ . " => $cardCount \n";
$totalCardCount += $cardCount;
}
}
my $summaryMessage = "There are a total of $totalCardCount cards supported in this release.";
my $headerRow = &getHeader( \@keys );
open OUTFILE, ">$outputFile" || die "$0: Can't write to $outputFile. $!\n";
#print index keys of cards
# print the miki card count information
print OUTFILE<<MIKI;
print OUTFILE<<MIKI;
$summaryMessage
MIKI
@@ -58,6 +74,8 @@ foreach my $key ( @keys )
close OUTFILE;
}
print "$totalCardCount Processed\n";
sub getHeader

View File

@@ -10,6 +10,8 @@
# cards in Wagic for use in the Miki.
# http://wololo.net/.
####################################################
grep '^name=' ../../bin/Res/sets/primitives/mtg.txt ../../bin/Res/sets/primitives/borderline.txt|sed s/name=// | sed s/.*txt:// |sort -iu > supportedCards.txt
grep '^name=' ../../bin/Res/sets/primitives/mtg.txt ../../bin/Res/sets/primitives/borderline.txt|sed s/name=// | sed s/.*txt:// |sort -iu > supported_cards.txt
grep '^name=' ../../bin/Res/sets/mtg_todo.dat |sed s/name=// | sed s/.*txt:// |sort -iu > todo_cards.txt
perl createHTMLList_SupportedCards.pl < supportedCards.txt
perl createHTMLList_SupportedCards.pl -i supported_cards.txt
perl createHTMLList_SupportedCards.pl -i todo_cards.txt -t todo

View File

@@ -0,0 +1,214 @@
There are a total of 3900 cards supported in this release.
__NOTOC__
<ul id="Top">
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#B]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#C]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#D]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#E]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#F]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#G]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#H]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#I]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#J]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#K]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#L]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#M]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#N]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#O]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#P]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#Q]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#R]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#S]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#T]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#U]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#V]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#W]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#X]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#Y]]</li>
<li style="display:inline; list-style-type: none; right-padding: 5px" >[[#Z]]</li>
</ul>
<h2 style="width: 100%"><span id="A">A (179)</span> <span style="font-size:small; float: right;">Back to [[#Top]]</span></h2>
<ul id="index_A">
<li>AEther Barrier</li>
<li>AEther Burst</li>
<li>AEther Rift</li>
<li>AEther Storm</li>
<li>AEther Tide</li>
<li>AEther Tradewinds</li>
<li>AEthermage's Touch</li>
<li>AEtherplasm</li>
<li>Abandon Hope</li>
<li>Abduction</li>
<li>Abeyance</li>
<li>Absolver Thrull</li>
<li>Abu Ja'far</li>
<li>Abuna's Chant</li>
<li>Abundance</li>
<li>Abyssal Gatekeeper</li>
<li>Abyssal Horror</li>
<li>Abyssal Nightstalker</li>
<li>Abyssal Specter</li>
<li>Academy Rector</li>
<li>Accelerated Mutation</li>
<li>Acidic Dagger</li>
<li>Ad Nauseam</li>
<li>Adarkar Unicorn</li>
<li>Adarkar Valkyrie</li>
<li>Adarkar Windform</li>
<li>Adder-Staff Boggart</li>
<li>Adventurers' Guildhouse</li>
<li>Advice from the Fae</li>
<li>Aegis of Honor</li>
<li>Aeon Chronicler</li>
<li>Aerial Caravan</li>
<li>Afiya Grove</li>
<li>Agadeem Occultist</li>
<li>Aggravated Assault</li>
<li>Aggression</li>
<li>Agonizing Memories</li>
<li>Airdrop Condor</li>
<li>Ajani Goldmane</li>
<li>Ajani Vengeant</li>
<li>Akki Blizzard-Herder</li>
<li>Akki Lavarunner</li>
<li>Akki Lavarunner (Tok-Tok, Volcano Born)</li>
<li>Akki Underminer</li>
<li>Akuta, Born of Ash</li>
<li>Alabaster Potion</li>
<li>Aladdin</li>
<li>Aleatory</li>
<li>Alexi, Zephyr Mage</li>
<li>Ali from Cairo</li>
<li>All Hallow's Eve</li>
<li>All Suns' Dawn</li>
<li>Alley Grifters</li>
<li>Alluring Scent</li>
<li>Alms</li>
<li>Alpha Status</li>
<li>Alter Reality</li>
<li>Aluren</li>
<li>Amber Prison</li>
<li>Amnesia</li>
<li>Amphibious Kavu</li>
<li>Amulet of Quoz</li>
<li>Amulet of Vigor</li>
<li>An-Zerrin Ruins</li>
<li>Ana Battlemage</li>
<li>Ana Sanctuary</li>
<li>Anavolver</li>
<li>Ancestral Knowledge</li>
<li>Ancestral Memories</li>
<li>Ancestral Vision</li>
<li>Ancient Ooze</li>
<li>Ancient Ziggurat</li>
<li>Angel of Salvation</li>
<li>Angel's Grace</li>
<li>Angel's Trumpet</li>
<li>Angelic Protector</li>
<li>Angelic Renewal</li>
<li>Angus Mackenzie</li>
<li>Animal Boneyard</li>
<li>Animal Magnetism</li>
<li>Anowon, the Ruin Sage</li>
<li>Antagonism</li>
<li>Anthem of Rakdos</li>
<li>Anti-Magic Aura</li>
<li>Anurid Scavenger</li>
<li>Anurid Swarmsnapper</li>
<li>Anvil of Bogardan</li>
<li>Apathy</li>
<li>Apex Hawks</li>
<li>Aphetto Dredging</li>
<li>Aphetto Runecaster</li>
<li>Apocalypse Chime</li>
<li>Aquitect's Will</li>
<li>Arbiter of Knollridge</li>
<li>Arboria</li>
<li>Arc Blade</li>
<li>Arcane Denial</li>
<li>Arcane Teachings</li>
<li>Arcanum Wings</li>
<li>Arcbound Overseer</li>
<li>Archery Training</li>
<li>Architects of Will</li>
<li>Archive Trap</li>
<li>Archmage Ascension</li>
<li>Arctic Merfolk</li>
<li>Arcum Dagsson</li>
<li>Arcum's Sleigh</li>
<li>Arcum's Weathervane</li>
<li>Arcum's Whistle</li>
<li>Ardent Plea</li>
<li>Arena</li>
<li>Argothian Elder</li>
<li>Argothian Wurm</li>
<li>Armillary Sphere</li>
<li>Armor of Thorns</li>
<li>Arrest</li>
<li>Arrogant Wurm</li>
<li>Arrow Volley Trap</li>
<li>Arsenal Thresher</li>
<li>Artifact Possession</li>
<li>Artificial Evolution</li>
<li>Ashen Ghoul</li>
<li>Ashen-Skin Zubera</li>
<li>Ashes of the Fallen</li>
<li>Ashes to Ashes</li>
<li>Ashling the Pilgrim</li>
<li>Ashling's Prerogative</li>
<li>Ashling, the Extinguisher</li>
<li>Ashnod's Battle Gear</li>
<li>Ashnod's Cylix</li>
<li>Ashnod's Transmogrant</li>
<li>Assault // Battery (Assault)</li>
<li>Assault // Battery (Battery)</li>
<li>Assembly Hall</li>
<li>Assert Authority</li>
<li>Astral Slide</li>
<li>Astrolabe</li>
<li>Atalya, Samite Master</li>
<li>Atogatog</li>
<li>Attunement</li>
<li>Augur of Skulls</li>
<li>Augury Adept</li>
<li>Augury Owl</li>
<li>Auntie's Snitch</li>
<li>Aura Barbs</li>
<li>Aura Flux</li>
<li>Aura Graft</li>
<li>Auratouched Mage</li>
<li>Auriok Siege Sled</li>
<li>Auriok Steelshaper</li>
<li>Auriok Windwalker</li>
<li>Austere Command</li>
<li>Autochthon Wurm</li>
<li>Autumn's Veil</li>
<li>Avalanche</li>
<li>Avatar of Discord</li>
<li>Avatar of Hope</li>
<li>Avatar of Will</li>
<li>Avatar of Woe</li>
<li>Aven Augur</li>
<li>Aven Farseer</li>
<li>Aven Fateshaper</li>
<li>Aven Mimeomancer</li>
<li>Aven Mindcensor</li>
<li>Aven Shrine</li>
<li>Aven Soulgazer</li>
<li>Aven Warcraft</li>
<li>Aven Warhawk</li>
<li>Aven Windreader</li>
<li>Avenging Druid</li>
<li>Avizoa</li>
<li>Avoid Fate</li>
<li>Awakener Druid</li>
<li>Awe Strike</li>
<li>Awesome Presence</li>
<li>Ayesha Tanaka</li>
<li>Azorius AEthermage</li>
<li>Azorius Guildmage</li>
<li>Azorius Ploy</li>
</ul>

File diff suppressed because it is too large Load Diff