Automatically upload engine games to the web -- How To

Sort:
WhereDoesTheHorseGo

I finally figured out how to automatically display my engine matches online:

My site: http://www.westportchessclub.org/computer-chess/live-game.htm

How I am doing it:
I am using ChessGUI (www.chessgui.com) to run the engine match on my local PC. Within ChessGUI, I selected the checkbox for writing to the game's PGN file as the game progresses--not just at the end of the game.

I am using the Windows FTP command in a batch file to automatically FTP the current PGN file to my web host. The batch file, which I called LivePGN-Upload.cmd, looks like this:

-----------------------------------
@echo off
:Ftpbegin
FTP -v -s:ftp.txt ftp.mywebsite.org
GOTO Wait

:Wait
sleep 300
GOTO Ftpbegin
-----------------------------------



My ftp.txt file, the file that gets called by the Windows batch file above, has the text I wish to have automatically entered within the FTP prompt, and it looks like this:

-----------------------------------
myftpusername
myftppassword
cd chess-club/computer-chess
binary
prompt n
put LivePgn.pgn
bye
-----------------------------------

I also had to download sleep.exe to make the batch file wait 300 seconds before re-uploading the game's PGN file. Google for it, then copy it to your Windows\System32 directory. You will need admin privileges.

Note: The batch file and the ftp.txt file have been placed in the ChessGUI\OUTPUT folder, where the game's live pgn file, LivePgn.pgn, is.

To see how I am displaying the game online, you'll just have to view the source code of that web page listed above.


I hope this has helped. I love it when I Google for something and see that someone has taken time to share the whole process.

Best wishes and happy chessing!

-----
Tag words: how to do i automatically upload display show my computer chess engine games match tournament to the web internet online