So I own a mac which has perl built in (windows users can also get perl... through ActivePerl or Cygwin).
Anyhow I wanted to simply print a OCTGN deck as a text list. So I wrote a perl script to do this.
#!/usr/bin/perl -w
#
#
while(<STDIN>) {
chomp;
if(/^.*<card qty="(.*?)" id=".*">(.*?)</card>.*$/) {
my $qty = $1;
my $card = $2;
printf("%-30s x%d ",$card,$qty);
}
elsif(/^.*<section name="(.*?)">/) {
printf(" %s ---------------------------------- ",$1);
}
}
exit 0;
Save this file as something like deckPrint.pl
then use something like perl deckPrint.pl < yourDeck.o8d
And you get something like this:
Note I piped it through pr -2 to make it 2 columns to keep the image size down.