mirror of
https://github.com/correl/mage.git
synced 2025-03-18 17:00:10 -09:00
Add argument. Can go say: gen_all_files_in_dck.pl basic to find just basics or gen_all_files_in_dck.pl basic | grep "HOU:" to find just HOU basics.
This commit is contained in:
parent
9284bbe6f3
commit
e268acbdf8
1 changed files with 9 additions and 2 deletions
|
@ -28,6 +28,8 @@ sub toCamelCase
|
||||||
return $string;
|
return $string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $option = $ARGV[0];
|
||||||
|
|
||||||
open (DATA, $setsFile) || die "can't open $setsFile";
|
open (DATA, $setsFile) || die "can't open $setsFile";
|
||||||
while(my $line = <DATA>)
|
while(my $line = <DATA>)
|
||||||
{
|
{
|
||||||
|
@ -37,7 +39,7 @@ while(my $line = <DATA>)
|
||||||
}
|
}
|
||||||
close(DATA);
|
close(DATA);
|
||||||
|
|
||||||
my $dir_listing = "dir \/a \/b \/s ..\\Mage.Sets\\ | find \".java\" |";
|
my $dir_listing = "dir \/a \/b \/s ..\\Mage.Sets\\src\\mage\\sets | find \".java\" |";
|
||||||
open (DIR_LISTING, "$dir_listing");
|
open (DIR_LISTING, "$dir_listing");
|
||||||
my %setsForJavafile;
|
my %setsForJavafile;
|
||||||
my $totalCards = 0;
|
my $totalCards = 0;
|
||||||
|
@ -78,7 +80,12 @@ while (<DIR_LISTING>)
|
||||||
$setsForJavafile {$f} = $trigraph;
|
$setsForJavafile {$f} = $trigraph;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($line =~ m/SetCardInfo\("([^"]+)",([^,]+),/img)
|
if ($line !~ m/$option/img)
|
||||||
|
{
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($line =~ m/SetCardInfo\("([^"]+)",([^,]+),/im)
|
||||||
{
|
{
|
||||||
$name = $1;
|
$name = $1;
|
||||||
$cardNum = $2;
|
$cardNum = $2;
|
||||||
|
|
Loading…
Add table
Reference in a new issue