CodeWorker and PGN

The tools used to generate all the interactive chess webpages with simple PGN files can be downloaded here. You will then be able to generate your own interactive webpages with your own PGN files. Besides you will be able to improve these source files after consulting CodeWorker web site.

  1. Create a root directory. In what follows it will be called chessroot/;
  2. Download the file chess.zip. This file only contains text files (.pgn and .gen formats) and pictures (.gif and .jpg formats);
  3. Download the executable codeworker.exe (version 3.12, Windows only) and libcurl.dll in chessroot/. The last version on Windows and/or any platform can be downloaded here;
  4. Unzip chess.zip in chessroot/;
  5. The PGN format file pgnexample.pgn is given as an example in chessroot/input/pgn/. In a prompt window, launch : codeworker.exe -I input/scripts/ -I input/pgn/ -I input/ -script allchesspublic.gen -D PGN_FILE=pgnexample.pgn. You should obtain this, the root file, pgnexample.htm, is in the directory chessroot/output/internet/;
  6. You can use your own PGN files : for this, should your file be entitled myfile.pgn, you just have to copy it in chessroot/input/pgn/ and then modify the input file name in the command line : -D PGN_FILE=myfile.

Chess games files in PGN format can be easily found on the net. Here for instance.

The given files have worked with all well-formatted PGN files I have tested. Nevertheless I do not guaranty that all PGN files can be read. If you should find an apparently well-formatted PGN file but which can not be parsed please go and visit CodeWorker web site. Read and learn the documentation and the tutorial. You will then be able to adapt the given '.gen' files and then parse your PGN file. Besides you will be able to modify and surely improve them. You can join me here if you can not solve your problem.