hi
does any body know a place were i can find a source code to read pgn files?
thanks guys
pgn viewer source
Moderator: Ras
-
- Posts: 28390
- Joined: Fri Mar 10, 2006 10:06 am
- Location: Amsterdam
- Full name: H G Muller
Re: pgn viewer source
Any GUI must contain such code, so you could rip it out of an open-source GUI (e.g. SCID, WinBoard). The code in WinBoard is not terribly compact, though. With parser.c and moves.c (and the included header files) you should have most of it, though. It was never designed as stand-alonecode, though, so you might have to do a lot of patching to cut it loose from the rest of the code.
Remember that parsing PGN needs an internal representation of the board, and the reason why any program would parse it probably also does,and the representation used by a program you take the code frommight not be very suited for what you need.
Remember that parsing PGN needs an internal representation of the board, and the reason why any program would parse it probably also does,and the representation used by a program you take the code frommight not be very suited for what you need.
-
- Posts: 397
- Joined: Sun Oct 29, 2006 4:38 am
- Location: Schenectady, NY
Re: pgn viewer source
Pierre Bokma wrote:hi
does any body know a place were i can find a source code to read pgn files?
thanks guys
http://www.horizonchess.com/pmwiki.php? ... rogramming
'Source Code and Tools'
San Kit -- Chess library: Import/export PGN files, etc.
It's C source code written by Steven Edwards
-
- Posts: 74
- Joined: Sat Dec 18, 2010 5:19 pm
- Location: Tianjin, China
- Full name: Chao M.
Re: pgn viewer source
chessX may be a good choice for you!
See the database dir under the src.
It used Qt lib. So you should install Qt, and then all of the code was able to be compiled.
http://chessx.sourceforge.net/?q=node/3
See the database dir under the src.
It used Qt lib. So you should install Qt, and then all of the code was able to be compiled.
http://chessx.sourceforge.net/?q=node/3