lichess.org
Donate

uci a san

The command line utility pgn-extract can very likely do this (www.cs.kent.ac.uk/people/staff/djb/pgn-extract/). It is meant for 'searching, manipulating and formatting chess games in PGN format', but it quite happily accepts games in other formats.

For instance, if you feed it

e2e4 e7e5 g1f3 *

it produces

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]

1. e4 e5 2. Nf3 *

This topic has been archived and can no longer be replied to.