https://github.com/fsmosca/pgnhelper
https://pypi.org/project/pgnhelper/
Sample Installation
Code: Select all
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Try the new cross-platform PowerShell https://aka.ms/pscore6
PS C:\WINDOWS\system32> cd f:\
PS F:\> python -V
Python 3.9.1
PS F:\> pip install pgnhelper
Successfully installed pgnhelper-0.3.0
PS F:\> pgnhelper -v
0.3.0
PS F:\> pgnhelper -h
usage: pgnhelper [-h] [-v] {sort,addeco,roundrobin} ...
positional arguments:
{sort,addeco,roundrobin}
sort Sort the games from the given pgn file based on the given game tags. e.g. pgnhelper sort
mygames.pgn --outpgnfn out.pgn --sort-tag opening --sort-direction hightolow
addeco Add eco and ecot codes, opening and variation names to the input pgn file. The eco, opening
etc. are from the given input file eco.pgn. e.g. pgnhelper addeco --inpgnfn mygames.pgn
--inecopgnfn eco.pgn --outpgnfn out.pgn
roundrobin Generate round-robin table results from the input pgn file. The output can be html, csv and
txt. e.g. pgnhelper roundrobin --inpgnfn candidates.pgn --output candidates.html
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
PS F:\> pgnhelper roundrobin -h
usage: pgnhelper roundrobin [-h] --inpgnfn INPGNFN --output OUTPUT [--win-point WIN_POINT] [--draw-point DRAW_POINT]
[--table-color TABLE_COLOR]
optional arguments:
-h, --help show this help message and exit
--inpgnfn INPGNFN Write the input pgn filename, required.
--output OUTPUT Write the output filename, required, can be .html, .csv or .txt. e.g --output tata_steel.html
--win-point WIN_POINT
The point when the players wins, default=1.0
--draw-point DRAW_POINT
The point when the players draws, default=0.5
--table-color TABLE_COLOR
Write table color not required. [default="blue_light" value=("yellow_light", "grey_light",
"orange_light", "green_light", "red_light", "yellow_dark", "grey_dark", "blue_dark",
"orange_dark", "green_dark", "red_dark")]
PS F:\> pgnhelper roundrobin --inpgnfn "Palma1971.pgn" --output "Palma1971.html"
