Chess-PGN-Filter

 view release on metacpan or  search on metacpan

Filter.pm  view on Meta::CPAN

    my ($class,%arg) = @_;
    bless {
        _verbose => defined $arg{verbose} ? $arg{verbose} : 1, #default legacy verbose
        _filtertype => $arg{filtertype},
        _source => $arg{source},
        _fen => $arg{fen} || 'no',
        _position => $arg{position} || 'yes',
        _type => $arg{type} || ($arg{font} || 'marroquin'),
        _border => $arg{single} || 'single',
        _corner => $arg{square} || 'square',
        _legend => $arg{legend} || 'no',
        _size => $arg{size} || '5',
        _font => $arg{font} || 'Chess Kingdom',
        _ECO => $arg{ECO} || 'yes',
        _NIC => $arg{NIC} || 'no',
        _Opening => $arg{Opening} || 'yes',
        _substitutions => $arg{substitutions},
        _exclude => $arg{exclude},
        _comments => $arg{comments} || 'yes',
        _nags => $arg{nags} || 'yes',
        _ravs => $arg{ravs} || 'yes',

Filter.pm  view on Meta::CPAN

    my $Gametext = shift;
    my $tabs = "\t" x 2 . "\t" x $level;
    my $text = '';
    my $diagram = sub {
        my $element = shift;
        my @rows = epdstr(
            epd => $element,
            type => $parms->get_type(),
            border => $parms->get_border(),
            corner => $parms->get_corner(),
            legend => $parms->get_legend()
            );
        my $text = '';

        $text .= qq|$tabs\t<POSITION FONT="|.$parms->get_font().'" SIZE="'.($parms->get_size() - 2).qq|">\n|;
        foreach my $row (@rows) {
            $text .= "$tabs\t\t<ROW>$row</ROW>\n";
        }
        $text .= "$tabs\t</POSITION>\n";
        return $text;
    };

Filter.pm  view on Meta::CPAN

=item * Tilburg -- Eric Schiller and Bill Cone

=item * Traveller Standard v3 -- Alan Cowderoy

=back

=item * border, values can be either 'single' or 'double' (default is 'single'.)

=item * corner, values can be either 'square' or 'rounded' (default is 'square'.)

=item * legend, values can be either 'yes' or 'no' (default is 'no'.)

=item * size, value ranging from 1 to 6 that controls the size of the embedded diagram (default is 5.)

=back

B<Note> -- not all fonts support all combinations of 'border', 'corner' and 'legend'. No warnings or
errors will be generated by unsupported options, you get the best a font can do, no more!

=back

=head2 EXPORT

=over

=item filter - given a source file and specification, convert to supported output. See details in B<Description>.



( run in 1.727 second using v1.01-cache-2.11-cpan-22024b96cdf )