#### Repository https://github.com/programarivm/pgn-chess  PGN Chess for PHP is a simple, friendly, and powerful PGN (Portable Game Notation) library for running chess games from within PHP applications. It is a chess board representation that can be used in chess engines, chess applications and chess algorithms. ### New Features [Feature/pgnsyntax](https://github.com/programarivm/pgn-chess/pull/3) is a new command to check the syntax of a PGN file: - `pgnsyntax.php` The PR is the continuation of [PHP Command That Converts a PGN File into a MySQL Script](https://steemit.com/utopian-io/@programarivm/php-command-that-converts-a-pgn-file-into-a-mysql-script). It is also an improvement of `pgntomysql.php` -- now PGN files are converted to MySQL `INSERT` statements as long as they are syntactically correct. Example: php pgnsyntax.php games.pgn Whoops! Sorry but this is not a valid PGN file. -------------------------------------------------------- Site: Bhubaneswar IND Date: 2018.05.28 Round: 5.3 White: Nitin, S Black: Amonatov, Farrukh Result: 0-1 WhiteElo: 2432 BlackElo: 2608 EventDate: 2018.05.25 ECO: B90 -------------------------------------------------------- Event: 11. KIIT Elite Open 2018 Site: Bhubaneswar IND Date: 2018.05.28 Round: 5.17 White: Raahul, V S Black: Neverov, Valeriy Result: 1/2-1/2 WhiteElo: 2231 BlackElo: 2496 EventDate: 2018.05.25 ECO: A25 1.foo f5 2.Nc3 Nf6 3.g3 e5 4.Bg2 Nc6 5.e3 Bb4 6.Nge2 O-O 7.O-O d6 8.Nd5 Nxd5 9.cxd5 Ne7 10.d4 Ba5 11.b4 Bb6 12.dxe5 dxe5 13.Qb3 Kh8 14.a4 a6 15. Bb2 Ng6 16.a5 Ba7 17.Qc3 Re8 18.Nf4 Re7 19.Nxg6+ hxg6 20.Rac1 Rb8 21.b5 b6 22.Ba3 Rf7 23.axb6 Rxb6 24.Bc5 e4 25.Bxb6 Bxb6 26.bxa6 Bxa6 27.Rfd1 Rd7 28.Qe5 Rd6 29.Bf1 Bxf1 30.Kxf1 c6 31.Kg2 Kh7 32.h4 cxd5 33.h5 Qd7 34.Rh1 g5 35.Rc8 f4 36.h6 f3+ 37.Kg1 Rxh6 38.Rh8+ Kg6 39.R1xh6+ gxh6 40.Rg8+ Kh5 41.Qf6 Bxe3 42.fxe3 Qc7 43.Qg6+ Kg4 44.Qe6+ Kxg3 45.Rc8 Qa7 46.Qd6+ Kg4 47.Qe6+ Kg3 48.Qd6+ Kg4 1/2-1/2 -------------------------------------------------------- Event: TCh-FRA Top 12 2018 Site: Brest FRA Date: 2018.05.28 Round: 3.6 White: Eljanov, Pavel Black: Ragger, Markus Result: 1/2-1/2 WhiteElo: 2702 BlackElo: 2672 EventDate: 2018.05.26 ECO: A34 1.Nf3 Nf6 20.c4 c5 3.Nc3 d5 4.cxd5 Nxd5 5.e3 e6 6.Bb5+ Bd7 7.Be2 Nc6 8.O-O Be7 9.d4 cxd4 10.Nxd5 exd5 11.exd4 O-O 12.Ne5 Bf5 13.Be3 Bf6 14.Nxc6 bxc6 15.Bd3 Bxd3 16.Qxd3 Qb6 17.Rfc1 Rfe8 18.Qc3 1/2-1/2 -------------------------------------------------------- Please check these games. Do they provide the STR (Seven Tag Roster)? Is the movetext valid? For further information please visit section [4. Command Line Interface (CLI)](https://github.com/programarivm/pgn-chess#4-command-line-interface-cli) #### Technology Stack - PHP - MySQL #### Roadmap At this moment the project is in a position to start loading thousands and thousands of chess games into a database for further processing. #### Would you help make this library better? Contributions are welcome. - Feel free to send a pull request - Drop an email at info@programarivm.com with the subject "PGN Chess Contributions" - Leave me a comment on [Twitter](https://twitter.com/programarivm) - Say hello on [Google+](https://plus.google.com/+Programarivm) Many thanks. #### GitHub Account https://github.com/programarivm
author | programarivm |
---|---|
permlink | php-command-to-check-the-syntax-of-a-chess-pgn-file |
category | utopian-io |
json_metadata | {"tags":["utopian-io","development","php","chess"],"image":["https://cdn.steemitimages.com/DQmTM9BF4xn2N3LQRPbH7941eTiA6fUHiJtRsiEEP3x66GV/white-chess-pieces.jpg"],"links":["https://github.com/programarivm/pgn-chess","https://github.com/programarivm/pgn-chess/pull/3","https://steemit.com/utopian-io/@programarivm/php-command-that-converts-a-pgn-file-into-a-mysql-script","https://github.com/programarivm/pgn-chess#4-command-line-interface-cli","https://twitter.com/programarivm","https://plus.google.com/+Programarivm","https://github.com/programarivm"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-08-19 21:35:30 |
last_update | 2018-08-19 21:37:42 |
depth | 0 |
children | 7 |
last_payout | 2018-08-26 21:35:30 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 16.490 HBD |
curator_payout_value | 5.418 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,559 |
author_reputation | 2,631,258,794,707 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,736,540 |
net_rshares | 16,426,212,935,766 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
azizbd | 0 | 86,974,145,001 | 78% | ||
semasping | 0 | 4,632,020,601 | 100% | ||
doughtaker | 0 | 8,177,740,198 | 40% | ||
rafalski | 0 | 24,819,989,453 | 53% | ||
dreamarif | 0 | 113,093,012 | 12% | ||
andrejcibik | 0 | 87,354,727,001 | 100% | ||
jrawsthorne | 0 | 8,441,533,858 | 100% | ||
utopian-io | 0 | 14,459,900,569,181 | 20.62% | ||
steemtaker | 0 | 3,899,146,341 | 12% | ||
amosbastian | 0 | 25,621,092,400 | 37.49% | ||
nafestw | 0 | 9,349,965,382 | 62.19% | ||
grammarnazi | 0 | 118,390,479 | 50% | ||
remind-me | 0 | 81,899,296 | 100% | ||
mightypanda | 0 | 10,107,520,190 | 50% | ||
truthly | 0 | 95,758,355 | 100% | ||
jacekw.dev | 0 | 1,600,962,374 | 100% | ||
steem-ua | 0 | 1,694,924,382,644 | 72.18% |
Thank you for your contribution. In your single commit, you have changed 47 files with 40,736 additions and 247 deletions, it's better to divide your work across multiple commits. Also all the generated files, which are not useful for the app can be written in the .gitignore file. Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/3322213). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | codingdefined |
---|---|
permlink | re-programarivm-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180820t113401462z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/3322213","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2018-08-20 11:34:00 |
last_update | 2018-08-20 11:34:00 |
depth | 1 |
children | 2 |
last_payout | 2018-08-27 11:34:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 3.894 HBD |
curator_payout_value | 1.263 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 773 |
author_reputation | 529,662,702,871,277 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,793,939 |
net_rshares | 3,815,458,463,272 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
azizbd | 0 | 3,525,978,851 | 3% | ||
mys | 0 | 1,192,085,110 | 1.2% | ||
pixelfan | 0 | 1,763,660,039 | 1% | ||
espoem | 0 | 16,050,013,546 | 15% | ||
utopian-io | 0 | 3,784,321,810,218 | 5.42% | ||
steemtaker | 0 | 2,064,253,945 | 6% | ||
cheneats | 0 | 315,006,755 | 2.5% | ||
amosbastian | 0 | 5,885,926,632 | 8.66% | ||
mops2e | 0 | 339,728,176 | 10% |
Hi @codingdefined, thanks for the review. Yep, it is better to divide the work across multiple commits. Let me just note that I am squash merging my new features as it is shown in this example: [Feature/pgnsyntax (#3)](https://github.com/programarivm/pgn-chess/commit/3e2390e1f315918f915d5b674f7606cb6aa3feae) Is that okay? :) I'd like to squash merge the branches to keep the history of the project a bit more concise. On the other hand, here is the reason behind so many additions. I just added a few sample PGN files for testing purposes, and those ones contain thousands of lines -- [games-02.pgn](https://github.com/programarivm/pgn-chess/blob/3e2390e1f315918f915d5b674f7606cb6aa3feae/tests/unit/PGN/File/data/games-02.pgn) is an example having 10004 lines.
author | programarivm |
---|---|
permlink | re-codingdefined-re-programarivm-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180821t120646828z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["codingdefined"],"links":["https://github.com/programarivm/pgn-chess/commit/3e2390e1f315918f915d5b674f7606cb6aa3feae","https://github.com/programarivm/pgn-chess/blob/3e2390e1f315918f915d5b674f7606cb6aa3feae/tests/unit/PGN/File/data/games-02.pgn"],"app":"steemit/0.1"} |
created | 2018-08-21 12:06:51 |
last_update | 2018-08-21 12:08:21 |
depth | 2 |
children | 0 |
last_payout | 2018-08-28 12:06:51 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 768 |
author_reputation | 2,631,258,794,707 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,906,907 |
net_rshares | 0 |
Thank you for your review, @codingdefined! So far this week you've reviewed 11 contributions. Keep up the good work!
author | utopian-io |
---|---|
permlink | re-re-programarivm-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180820t113401462z-20180822t194508z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.42"}" |
created | 2018-08-22 19:45:09 |
last_update | 2018-08-22 19:45:09 |
depth | 2 |
children | 0 |
last_payout | 2018-08-29 19:45:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 117 |
author_reputation | 152,955,367,999,756 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 69,049,229 |
net_rshares | 0 |
You have a minor misspelling in the following sentence: <blockquote>At this moment the project is in a position to start loading thousands and thousands of chess games into a database for futher processing.</blockquote> It should be <i>further</i> instead of <i>futher</i>.
author | grammarnazi |
---|---|
permlink | re-programarivm-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180819t213513742z |
category | utopian-io |
json_metadata | {"app":"steemit"} |
created | 2018-08-19 21:35:36 |
last_update | 2018-08-19 21:35:36 |
depth | 1 |
children | 1 |
last_payout | 2018-08-26 21:35:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 273 |
author_reputation | -144,064,903,190 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,736,548 |
net_rshares | 595,425,500 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
programarivm | 0 | 595,425,500 | 100% |
Hi @grammarnazi, thanks for proofreading my post.
author | programarivm |
---|---|
permlink | re-grammarnazi-re-programarivm-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180819t213928095z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"users":["grammarnazi"],"app":"steemit/0.1"} |
created | 2018-08-19 21:39:27 |
last_update | 2018-08-19 21:39:27 |
depth | 2 |
children | 0 |
last_payout | 2018-08-26 21:39:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 49 |
author_reputation | 2,631,258,794,707 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,736,805 |
net_rshares | 0 |
Hi @programarivm! We are @steem-ua, a new Steem dApp, computing UserAuthority for all accounts on Steem. We are currently in test modus upvoting quality Utopian-io contributions! Nice work!
author | steem-ua |
---|---|
permlink | re-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180820t122026z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.54"}" |
created | 2018-08-20 12:20:27 |
last_update | 2018-08-20 12:20:27 |
depth | 1 |
children | 0 |
last_payout | 2018-08-27 12:20:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 189 |
author_reputation | 23,214,230,978,060 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,797,845 |
net_rshares | 607,577,041 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
programarivm | 0 | 607,577,041 | 100% |
Hey @programarivm **Thanks for contributing on Utopian**. Weβre already looking forward to your next contribution! **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-php-command-to-check-the-syntax-of-a-chess-pgn-file-20180821t142008z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.42"}" |
created | 2018-08-21 14:20:09 |
last_update | 2018-08-21 14:20:09 |
depth | 1 |
children | 0 |
last_payout | 2018-08-28 14:20:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.018 HBD |
curator_payout_value | 0.004 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 305 |
author_reputation | 152,955,367,999,756 |
root_title | "PHP Command to Check the Syntax of a Chess PGN File" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 68,918,740 |
net_rshares | 16,419,921,927 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
espoem | 0 | 16,080,193,751 | 15% | ||
mops2e | 0 | 339,728,176 | 10% |