Answers.Body: <p>You may want to do it yourself. Please take a look at a PGN annotation project on Github:</p>
  
  <ul>
  <li><a href="https://github.com/fsmosca/chess-artist" rel="nofollow noreferrer">https://github.com/fsmosca/chess-artist</a></li>
  </ul>
  
  <p>The source code is easy to follow.</p>
  
  <ul>
  <li>To get the engine evaluation, you have:</li>
  </ul>
  
  <blockquote>
    <p>engBestMove, engBestScore, complexityNumber, moveChanges, pvLine = self.GetSearchScoreBeforeMove(gameNode.board().fen(), side)</p>
  </blockquote>
  
  <ul>
  <li>To check whether a move you play is a blunder:</li>
  </ul>
  
  <blockquote>
    <p>if abs(engBestScore) > 3.0:</p>
  </blockquote>
  
  <ul>
  <li>To print FEN:</li>
  </ul>
  
  <blockquote>
    <p>fen = gameNode.board().fen()</p>
  </blockquote>
  
  <ul>
  <li>To print FEN and whatever you want to the console, follow the implementation in:</li>
  </ul>
  
  <blockquote>
    <p>def WriteNotation(self, side, fmvn, sanMove, bookMove, posScore,
                          isGameOver, engMove, engScore, complexityNumber,
                          moveChanges, pvLine, threatMove):</p>
  </blockquote>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-20T12:56:02.610Z
Answers.Text: I'm going to investigate this a bit further; a cursory glance seems like this is exactly what I'm looking for.
Answers.UserDisplayName: Kale
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-20T12:56:44.453Z
Answers.Text: @Kale tell me if you need more help
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-20T12:59:48.077Z
Answers.Text: will do; probably won't get to it (in-depth) until the weekend. Cool project!
Answers.UserDisplayName: Kale
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-20T01:13:43.033Z
Answers.LastActivityDate: 2017-03-20T01:13:43.033Z
Answers.UserDisplayName: SmallChess
Answers.Body: <p>You can count on crafty. Its annotate or annotateh command, allows you to 
  automatically comment games with variations. You can specify wich side to 
  analyze; how much difference on engine evaluation (after/before) will trigger an annotation an also the time invested analyzing each position. </p>
  
  <p>After that, SCID, Chesspad, Compoches or any other software for visualizing 
  pgn gamescores will allow you to review your game and most important than 
  Anki, to anotate your thoughts.</p>
  
  <p>Here I reproduce the pertinent fragment from a help doc about crafty commands:</p>
  
  <pre><code>annotate | annotateh &lt;filename&gt; &lt;colors | name&gt; &lt;moves&gt; &lt;margin&gt; &lt;time&gt;
  </code></pre>
  
  <p>This command is used to annotate (make comments in) a game that has already 
  been played; annotate produces a file with the .can extension added to the 
  original name. This file will contain pure ascii information from the 
  annotation pass.</p>
  
  <p>The annotateh command will produce an htm file.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-19T22:56:38.743Z
Answers.LastActivityDate: 2017-03-19T22:56:38.743Z
Answers.UserDisplayName: djnavas
Body: <p>What is the best way to go through a database of my games and have the computer generate a FEN string as well as the next move any time I make an error greater than, say, a minor piece loss?</p>
  
  <p>I've looked at SCID a bit and am not sure if I can do it there. I also doubt I could do it with stockfish on the command line. Pointers?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-19T20:32:28.533Z
Comments.Text: Not exactly what you are asking for, but lichess has a nice feature called "Learn from your mistakes". https://en.lichess.org/blog/WFvLpiQAACMA8e9D/learn-from-your-mistakes  which might be useful to you. Also you can upload games to lichess.
Comments.UserDisplayName: user1583209
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-19T20:50:58.767Z
Comments.Text: yeah, I'm messing around with that, but it won't quite do what I want. I'm looking to generate FEN strings of all the positions where I blundered, then input it into Anki Memorization App to help me learn (along with other things). So I'm looking for batch processing.
Comments.UserDisplayName: Kale
Tags: <engines><analysis><stockfish><scid><fen>
Title: Engine output: FEN string when blundering
ThreadText: # Engine output: FEN string when blundering
  
  (Asked by: username_0 on 2017-03-19)
  
  What is the best way to go through a database of my games and have the computer generate a FEN string as well as the next move any time I make an error greater than, say, a minor piece loss?
  
  I've looked at SCID a bit and am not sure if I can do it there. I also doubt I could do it with stockfish on the command line. Pointers?
  
  **Tags:** engines, analysis, stockfish, scid, fen
  
  > **Comments:**
  > **username_1**: Not exactly what you are asking for, but lichess has a nice feature called "Learn from your mistakes". https://en.lichess.org/blog/WFvLpiQAACMA8e9D/learn-from-your-mistakes  which might be useful to you. Also you can upload games to lichess.  
  > **username_0**: yeah, I'm messing around with that, but it won't quite do what I want. I'm looking to generate FEN strings of all the positions where I blundered, then input it into Anki Memorization App to help me learn (along with other things). So I'm looking for batch processing.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2017-03-20. Score: 1 | Accepted answer
  
  You may want to do it yourself. Please take a look at a PGN annotation project on Github:
  
  * <https://github.com/fsmosca/chess-artist>
  
  The source code is easy to follow.
  
  * To get the engine evaluation, you have:
  
  > engBestMove, engBestScore, complexityNumber, moveChanges, pvLine = self.GetSearchScoreBeforeMove(gameNode.board().fen(), side)
  
  * To check whether a move you play is a blunder:
  
  > if abs(engBestScore) > 3.0:
  
  * To print FEN:
  
  > fen = gameNode.board().fen()
  
  * To print FEN and whatever you want to the console, follow the implementation in:
  
  > def WriteNotation(self, side, fmvn, sanMove, bookMove, posScore,
  > isGameOver, engMove, engScore, complexityNumber,
  > moveChanges, pvLine, threatMove):
  
  > **Comments:**
  > **username_0**: I'm going to investigate this a bit further; a cursory glance seems like this is exactly what I'm looking for.  
  > **username_2**: @username_0 tell me if you need more help  
  > **username_0**: will do; probably won't get to it (in-depth) until the weekend. Cool project!  
  
  ---
  
  ### Answer by username_3 on 2017-03-19. Score: 0
  
  You can count on crafty. Its annotate or annotateh command, allows you to 
  automatically comment games with variations. You can specify wich side to 
  analyze; how much difference on engine evaluation (after/before) will trigger an annotation an also the time invested analyzing each position. 
  After that, SCID, Chesspad, Compoches or any other software for visualizing 
  pgn gamescores will allow you to review your game and most important than 
  Anki, to anotate your thoughts.
  Here I reproduce the pertinent fragment from a help doc about crafty commands:
  annotate | annotateh     
  
  This command is used to annotate (make comments in) a game that has already 
  been played; annotate produces a file with the .can extension added to the 
  original name. This file will contain pure ascii information from the 
  annotation pass.
  The annotateh command will produce an htm file.
  
  
  ---
  
  