user1754: I want to read a PGN file and then advance to a certain move number, and feed that to an UCI engine.  Turns out engines work using long algebraic notation, and PGNs are in short algebraic.  What is an easy way to make the conversion?  i.e. from SAN to LAN.
I realize that generating long algebraic notation requires knowledge of the board state & chess rules, so I don't want to write it all again!  Surely something like this must already exist - either a command line program or a module (preferably in python).

user1751: Would this be what you are looking for? PGN-extract (A command line utility)
http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/
I can see a flag in the feature doc that might help:

-W[cm|epd|halg|lalg|elalg|san|uci] - specify the output format to use
-Whalg is hyphenated long algebraic.
-Wlalg is long algebraic
-Welalg[PNBRQK] is enhanced long algebraic. Use the characters PNBRQK for language


1754: <p>I want to read a PGN file and then advance to a certain move number, and feed that to an UCI engine.  Turns out engines work using long algebraic notation, and PGNs are in short algebraic.  What is an easy way to make the conversion?  i.e. from SAN to LAN.</p>

<p>I realize that generating long algebraic notation requires knowledge of the board state &amp; chess rules, so I don't want to write it all again!  Surely something like this must already exist - either a command line program or a module (preferably in python).</p>
 1751: <p>Would this be what you are looking for? <strong>PGN-extract</strong> (A command line utility)
<a href="http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/" rel="noreferrer">http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/</a></p>

<p>I can see a flag in the <a href="http://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/help.html" rel="noreferrer">feature doc</a> that might help:</p>

<ul>
<li><code>-W[cm|epd|halg|lalg|elalg|san|uci]</code> - specify the output format to use<br>
<code>-Whalg</code> is hyphenated long algebraic.<br>
<code>-Wlalg</code> is long algebraic<br>
<code>-Welalg[PNBRQK]</code> is enhanced long algebraic. Use the characters PNBRQK for language</li>
</ul>
