-language oatch tool (sync.pl) bug fix
-French _cards.dat updates to 0.8.1
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-08-16 06:13:36 +00:00
parent 592713338d
commit fd8dd58706
26 changed files with 11438 additions and 5028 deletions

View File

@@ -31,23 +31,21 @@ my $parseCards = sub {
}
if ($line =~ /=/){
my ($type, $content) = split(/=/, $line);
$card{$type} = $content;
$card{$type} = [] unless $card{$type};
push @{$card{$type}}, $content;
}
}
close (MYFILE);
my %cards = map { $_->{id} => $_ } @cards;
my %cards = map { $_->{id}[0] => $_ } @cards;
return \%cards;
};
my $doOutput = sub {
my ($outFile, $data, $translation) = @_;
open (OUTFILE, '>' . $outFile);
while ( my ($key, $value) = each(%$data) ) {
if (my $trans = $translation->{$key}){
@@ -55,7 +53,10 @@ my $doOutput = sub {
}
print OUTFILE "[card]\n";
while ( my ($k, $v) = each(%$value) ) {
print OUTFILE $k ."=" . $v . "\n";
my @v = @$v;
for my $line (@v){
print OUTFILE $k ."=" . $line . "\n";
}
}
print OUTFILE "[/card]\n";