PHP Command That Converts a PGN File into a MySQL Script

in utopian-io •  6 years ago  (edited)

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 [email protected] 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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi there,

Welcome to STEEM blockchain.

A couple for feedbacks for your future contributions:

It would be better starting the post with a little explanation about the project, before going deep on the new features/changes.

Also, regarding the "How did I implement it?" instead of sharing the code/PR directly, you may add a couple of sentences to enrich the content that what was the challenge, how did you solve them, what can be done in the feature, etc.


Your contribution has been evaluated according to Utopian policies and 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.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you for the feedback.

Thank you for your review, @emrebeyler!

So far this week you've reviewed 4 contributions. Keep up the good work!

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!

Hi @steem-ua. Thank you, that sounds encouraging! Now I am writing the PGN syntax checker.

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.

Vote for Utopian Witness!

Congratulations @programarivm! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

@programarivm, thank you for supporting @steemitboard as a witness.

Here is a small present to show our gratitude
Click on the badge to view your Board of Honor.

Once again, thanks for your support!

Do not miss the last post from @steemitboard:
SteemitBoard and the Veterans on Steemit - The First Community Badge.