Answers.Body: <ol>
  <li>Use <a href="https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/help.html" rel="nofollow noreferrer">pgn-extract</a>:</li>
  </ol>
  
  <blockquote>
    <p>... FEN positional matches with -t ...</p>
  </blockquote>
  
  <ol start="2">
  <li>Use <a href="https://github.com/fsmosca/chess-artist" rel="nofollow noreferrer">ChessArtist</a>. It supports any UCI chess engine, including Stockfish and Komodo.</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-31T04:37:07.350Z
Answers.Text: It looks good. I just wanted to know if it is possible to deal with FEN instead of PGNs for both?
Answers.UserDisplayName: A. Napster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-31T04:41:06.097Z
Answers.Text: @A.Napster My solution is not perfect. pgn-extract doesn't hook up with chess engine, and chess artist doesn't search. But there is nothing stopping you incorporating both in a script.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-31T04:49:51.860Z
Answers.Text: I know. my question is whether both can deal with or output FEN
Answers.UserDisplayName: A. Napster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-31T04:51:03.637Z
Answers.Text: @A.Napster pgn-extract can deal with FEN by itself. ChessArtist doesn't handle FEN, but it's easy to add.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-24T10:16:31.987Z
Answers.Text: Just a thumbs up to say that I managed to what I wanted with the programs you suggested. The only modification was writing the FEN as EPD then analysing with ChessArtist. Thanks again for your help.
Answers.UserDisplayName: A. Napster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-31T04:07:20.703Z
Answers.LastActivityDate: 2017-03-31T04:07:20.703Z
Answers.UserDisplayName: SmallChess
Answers.Body: <p>I am the author of <a href="https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/" rel="nofollow noreferrer">pgn-extract</a> and, as has been pointed out, it doesn't hook up directly with a chess engine. However, if you would like to try out something I recently wrote that does interface with an engine then there is a description of a <a href="https://www.cs.kent.ac.uk/people/staff/djb/chessplag/" rel="nofollow noreferrer">UCI-based analyser</a> that can output annotated PGN via its --annotatePGN option. It is still a little experimental and you will need to compile from source but it might provide something close to what you are looking for.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-24T10:09:31.157Z
Answers.Text: Thanks a lot for your help and program. However I've already managed to do the job with pgn-extract and ChessArtist. First I extract FEN with pgn-extract , write it in an epd format file then I analyse them  with ChessArtist using Stockfish. It doesn't look pretty but it works like a charm.
Answers.UserDisplayName: A. Napster
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-25T06:57:38.553Z
Answers.Text: I am glad you have a solution.
Answers.UserDisplayName: kentdjb
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-04-07T08:51:29.207Z
Answers.LastActivityDate: 2017-04-07T08:51:29.207Z
Answers.UserDisplayName: kentdjb
Body: <p>I've got two questions. I'm wondering if:</p>
  
  <ol>
  <li>It is possible to search for certain positions in a database (like Chessbase) and display all of them in a text file.</li>
  <li>To be able to assign a score to each position automatically with a chess engine. </li>
  </ol>
  
  <p>I've got some notions of programming but I wouldn't mind getting some ideas on how to write such a program.</p>
  
Tags: <engines><database><programming>
Title: Analysing Positions in Databases with a program
ThreadText: # Analysing Positions in Databases with a program
  
  (Asked by: username_0 on 2017-03-30)
  
  I've got two questions. I'm wondering if:
  
  1. It is possible to search for certain positions in a database (like Chessbase) and display all of them in a text file.
  2. To be able to assign a score to each position automatically with a chess engine.
  
  I've got some notions of programming but I wouldn't mind getting some ideas on how to write such a program.
  
  **Tags:** engines, database, programming
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2017-03-31. Score: 1 | Accepted answer
  
  1. Use [pgn-extract](https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/help.html):
  
  > ... FEN positional matches with -t ...
  
  2. Use [ChessArtist](https://github.com/fsmosca/chess-artist). It supports any UCI chess engine, including Stockfish and Komodo.
  
  > **Comments:**
  > **username_0**: It looks good. I just wanted to know if it is possible to deal with FEN instead of PGNs for both?  
  > **username_1**: @A.Napster My solution is not perfect. pgn-extract doesn't hook up with chess engine, and chess artist doesn't search. But there is nothing stopping you incorporating both in a script.  
  > **username_0**: I know. my question is whether both can deal with or output FEN  
  > **username_1**: @A.Napster pgn-extract can deal with FEN by itself. ChessArtist doesn't handle FEN, but it's easy to add.  
  > **username_0**: Just a thumbs up to say that I managed to what I wanted with the programs you suggested. The only modification was writing the FEN as EPD then analysing with ChessArtist. Thanks again for your help.  
  
  ---
  
  ### Answer by username_2 on 2017-04-07. Score: 2
  
  I am the author of [pgn-extract](https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/) and, as has been pointed out, it doesn't hook up directly with a chess engine. However, if you would like to try out something I recently wrote that does interface with an engine then there is a description of a [UCI-based analyser](https://www.cs.kent.ac.uk/people/staff/djb/chessplag/) that can output annotated PGN via its --annotatePGN option. It is still a little experimental and you will need to compile from source but it might provide something close to what you are looking for.
  
  > **Comments:**
  > **username_0**: Thanks a lot for your help and program. However I've already managed to do the job with pgn-extract and ChessArtist. First I extract FEN with pgn-extract , write it in an epd format file then I analyse them  with ChessArtist using Stockfish. It doesn't look pretty but it works like a charm.  
  > **username_2**: I am glad you have a solution.  
  
  ---
  
  