niklasf / python-chess

A chess library for Python, with move generation and validation, PGN parsing and writing, Polyglot opening book reading, Gaviota tablebase probing, Syzygy tablebase probing, and UCI/XBoard engine communication
https://python-chess.readthedocs.io/en/latest/
GNU General Public License v3.0
2.39k stars 520 forks source link

Support the TRF (Tournament Report File) format #1040

Open ZiyaoWei opened 1 year ago

ZiyaoWei commented 1 year ago

Would the TRF file format be something in scope for python-chess? There is a package for it (https://pypi.org/project/trf/) but it would be nice to have it packaged up in a popular library.

Reference: https://www.fide.com/FIDE/handbook/C04Annex2_TRF16.pdf

Format of TRF (Tournament Report File)
Agreed general Data-Exchange Format for tournament results to be submitted to FIDE.

In particular, it seems the lichess.org API only supports getting swiss tournament results using this format.

niklasf commented 1 year ago

Hi, it's definitely something to consider.

The existing modules chess.pgn, chess.polyglot, chess.gaviota, chess.syzygy, chess.engine, chess.svg all benefit significantly from sharing types like chess.Move and chess.Board. TRF on the other hand can stand on its own perfectly fine, so I am not sure.