Chess::PGN::EPD is a Perl extension to produce and manipulate EPD text.
SYNOPSIS
#!/usr/bin/perl
#
#
use warnings;
use strict;
use Chess::PGN::Parse;
use Chess::PGN::EPD;
if ($ARGV[0]) {
my $pgn = new Chess::PGN::Parse($ARGV[0]) or die "Can't open $ARGV[0]: $!n";
while ($pgn->read_game()) {
$pgn->parse_game();
print join ( "n", epdlist( @{$pgn->moves()} ) ), "nn";
}
}
OR
#!/usr/bin/perl
#
#
use warnings;
use strict;
use Chess::PGN::EPD;
my $position = 'rnbqkb1r/ppp1pppp/5n2/3P4/8/8/PPPP1PPP/RNBQKBNR w KQkq -';
print join("n",epdstr(epd => $position,type => 'latex'));
OR
#!/usr/bin/perl
#
#
use strict;
use warnings;
use Chess::PGN::Parse;
use Chess::PGN::EPD;
if ($ARGV[0]) {
my $pgn = new Chess::PGN::Parse($ARGV[0]) or die "Can't open $ARGV[0]: $!n";
while ($pgn->read_game()) {
my @epd;
$pgn->parse_game();
@epd = reverse epdlist( @{$pgn->moves()} );
print '[ECO,"',epdcode('ECO',@epd),""]n";
print '[NIC,"',epdcode('NIC',@epd),""]n";
print '[Opening,"',epdcode('Opening',@epd),""]n";
}
}
Requirements:
· Perl
Product's homepage