mirror of
https://gitlab.com/manzerbredes/pgnp.git
synced 2025-04-30 08:27:45 +00:00
Create project
This commit is contained in:
commit
fd78f92863
10 changed files with 21790 additions and 0 deletions
31
README.md
Normal file
31
README.md
Normal file
|
@ -0,0 +1,31 @@
|
|||
## PGNP: PGN Parser
|
||||
|
||||
PGNP is a Portable Game Notation (PGN) parser. More details about the
|
||||
PGN specification can be found [here](https://www.chessclub.com/help/PGN-spec).
|
||||
|
||||
# How to use it ?
|
||||
PGNP can be used as a shared library in your project.
|
||||
You only need to include the header file and linking the .so file to your
|
||||
executable.
|
||||
|
||||
# Example
|
||||
Load PGN from file:
|
||||
|
||||
pgnp::PGN pgn;
|
||||
try {
|
||||
pgn.FromFile("pgn.txt");
|
||||
}
|
||||
catch(...){
|
||||
// Handle exceptions
|
||||
}
|
||||
Load PGN from string:
|
||||
|
||||
pgnp::PGN pgn;
|
||||
try {
|
||||
pgn.FromString("YOUR PGN CONTENT HERE");
|
||||
}
|
||||
catch(...){
|
||||
// Handle exceptions
|
||||
}
|
||||
|
||||
// TODO: How to use the PGN object with the parsed data
|
Loading…
Add table
Add a link
Reference in a new issue