I need a tool to convert the lines from a pgn file to figurine notation. to paste later in a word processor, any suggestions?
1 Answer
You can use a python script to read the pgn file using python-chess library. Examine each move and get the piece (K, Q ... k, q ...) and convert each specific piece symbol to figurine.
Output
[Event "FIDE Candidates 2022"]
[Site "Madrid ESP"]
[Date "2022.06.17"]
[Round "1.1"]
[White "Duda, Jan-Krzysztof"]
[Black "Rapport, Richard"]
[Result "1/2-1/2"]
[BlackElo "2764"]
[BlackFideId "738590"]
[BlackTitle "GM"]
[ECO "B44"]
[EventDate "2022.06.17"]
[Opening "Sicilian defence"]
[WhiteElo "2750"]
[WhiteFideId "1170546"]
[WhiteTitle "GM"]
1.♙e4 ♟c5 2.♘f3 ♟e6 3.♙d4 ♟cxd4 4.♘xd4 ♞c6 5.♗f4 ♟d6 6.♘xc6 ♟bxc6 7.♗d3 ♞e7 8.♙c4 ♟g6 9.♙c5 ♟e5 10.♗g5 ♝g7 11.♙cxd6 ♛xd6 12.O-O ♝e6 13.♘a3 ♜d8 14.♗e2 ♛xd1 15.♖fxd1 ♜xd1+ 16.♗xd1 ♚d7 17.♗e2 ♞c8 18.♖d1+ ♚c7 19.♗c4 ♝g4 20.♙f3 ♟f6 21.♗e3 ♝d7 22.♗e2 ♟h5 23.♘c2 ♝f8 24.♙a3 ♟a5 25.♔f1 ♝e6 26.♗d2 ♚b6 27.♘e3 ♞d6 28.♖c1 ♟c5 29.♗e1 ♝h6 30.♖d1 ♜d8 31.♘d5+ ♝xd5 32.♖xd5 ♝e3 33.♖d3 ♝d4 34.♖b3+ ♚c6 35.♗xa5 ♜a8 36.♖b6+ ♚d7 37.♖a6 ♜xa6 38.♗xa6 ♝xb2 39.♙a4 ♟c4 40.♗b4 ♟h4 41.♔e2 ♚c6 42.♗a5 ♝c1 43.♗d8 ♝g5 44.♔d1 ♚d7 45.♗b6 ♚c6 46.♙a5 ♝f4 47.♔c2 ♟f5 48.♔c3 ♟fxe4 49.♙fxe4 ♞xe4+ 50.♔xc4 ♞d6+ 51.♔b4 ♝xh2 52.♗e2 ♟e4 53.♗c5 ♞f5 54.♗b5+ ♚c7 55.♗b6+ ♚b7 56.♗c4 ♞d6 57.♗e2 ♚c6 58.♗c5 ♞f5 59.♗b5+ ♚c7 60.♙a6 ♝d6 61.♙a7 ♝xc5+ 62.♔xc5 ♚b7 63.♗c6+ ♚xa7 64.♗xe4 ♞e3 65.♔d4 ♞xg2 66.♗xg2 ♟g5 67.♗h3 ♟g4 68.♗xg4 ♟h3 69.♗xh3
Open in ms word
-
i was wondering if the font needs to pre installed or are these unicode characters– cmgchessCommented Jul 6, 2022 at 6:10
-
1
-
I am more of a windows executable person. python is for later for me. can it be done in lazarus? Commented Jul 8, 2022 at 19:55
-
Never mind I have done it in delphi community edition. Very primitive exe, just two memo controls and a button, you type in one (or paste) and the other one display the figurine with a press of button. Commented Jul 9, 2022 at 18:51