PHP Command That Converts a PGN File into a MySQL Script

@programarivm · 2018-08-18 11:31 · utopian-io

Repository

https://github.com/programarivm/pgn-chess

black-chess-pieces.jpg

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

A command line interface (CLI) is created with the aim to convert PGN files into MySQL scripts. More specifically, Feature/pgntosql implements the following two commands.

Creates a MySQL PGN Chess database:

php cli/createdb.php
This will remove the current PGN Chess database and the data will be lost.
Do you want to proceed? (Y/N): y

Converts a PGN file into a MySQL INSERT statement:

php cli/pgntomysql.php example.pgn > example.sql

Note: pgntomysql.php works okay with a syntactically valid PGN file as a precondition.

Roadmap

A command that checks the syntax of PGN files has to be created in another PR.

  • pgnsyntax.php

For further information visit section 4. Command Line Interface (CLI)

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
  • Say hello on Google+

Many thanks.

GitHub Account

https://github.com/programarivm/pgn-chess

#utopian-io #development #pgn #chess #php
Payout: 0.000 HBD
Votes: 19
More interactions (upvote, reblog, reply) coming soon.