Bug 83958 - New Port: textproc/p5-Chess-PGN-Parse
Summary: New Port: textproc/p5-Chess-PGN-Parse
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-23 19:10 UTC by Aaron Dalton
Modified: 2005-08-31 12:14 UTC (History)
0 users

See Also:


Attachments
submission.txt (3.25 KB, text/plain)
2005-07-23 19:10 UTC, Aaron Dalton
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Dalton 2005-07-23 19:10:14 UTC
Chess::PGN::Parse offers a range of methods to read and manipulate 
Portable Game Notation files. PGN files contain chess games produced by 
chess programs following a standard format 
(http://www.schachprobleme.de/chessml/faq/pgn/). It is among the preferred 
means of chess games distribution. Being a public, well established 
standard, PGN is understood by many chess archive programs. Parsing simple 
PGN files is not difficult. However, dealing with some of the intricacies 
of the Standard is less than trivial. This module offers a clean handle 
toward reading and parsing complex PGN files.

A PGN file has several tags, which are key/values pairs at the header of 
each game, in the format [key "value"]

After the header, the game follows. A string of numbered chess moves, 
optionally interrupted by braced comments and recursive parenthesized 
variants and comments. While dealing with simple braced comments is 
straightforward, parsing nested comments can give you more than a 
headache.

Chess::PGN::Parse most immediate methods are: read_game() reads one game, 
separating the tags and the game text.

    parse_game() parse the current game, and stores the moves into an 
        array and optionally saves the comments into an array of hashes
        for furter usage. It can deal with nested comments and recursive
        variations.

    quick_parse_game() Same as the above, but doesn't save the comments, 
        which are just stripped    from the text. It can't deal with nested
        comments. Should be the preferred method when we know that we are
        dealing with simple PGNs.

    smart_parse_game() Best of the above methods. A  preliminary check
        will call parse_game() or quick_parse_game(), depending on the
        presence of nested comments in the game.

    read_all(), quick_read_all(), smart_read_all() will read all the records
        in the current PGN file and return an array of hashes with all the
        parsed details from the games.
Comment 1 Renato Botelho freebsd_committer freebsd_triage 2005-08-31 12:13:37 UTC
State Changed
From-To: open->closed

New port added. Thanks! 
I just add a BROKEN if perl is < 5.6, it's not building on FreeBSD 4.x with perl 5.005