Printing OCTGN decks (Some Tech knowledge required).

By bloodycelt, in 1. AGoT General Discussion

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:

4651972240_0ff431deab_d.jpg

Note I piped it through pr -2 to make it 2 columns to keep the image size down.

Great! But you did this cause you have problem using deckstatistics printing deck (in tx or pdf)???

I use a mac, and printing from a virtual machine is a chore.