Answers.Body: <p>You can make use of the online fen2png.com site, calling it with wget or curl:</p>
  <p><code>curl 'https://fen2png.com/api/?fen=r1b1k1nr/p2p1ppp/n2B4/1p1NPN1P/6P1/3P1Q2/P1P1K3/q5b1%20w%20kq%20-%20-&amp;raw=true' &gt; ~/a.png</code></p>
  <p>Or you can use a similarly-named python code (which I have not tested):</p>
  <p><a href="https://github.com/tikul/fen-to-png/blob/master/fen2png.py" rel="noreferrer">https://github.com/tikul/fen-to-png/blob/master/fen2png.py</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-15T13:02:28.923Z
Answers.LastActivityDate: 2022-02-15T13:02:28.923Z
Answers.UserDisplayName: L. Scott Johnson
Body: <p>I'm thinking about creating ANKI flashcards deck with my games positions as a training tool. Is there a way to programmatically (can be whatever programming language, I'll figure it out) generate diagrams from a bunch of FEN strings?</p>
  
Tags: <fen><diagram>
Title: Programming FEN diagrams
ThreadText: # Programming FEN diagrams
  
  (Asked by: username_0 on 2022-02-15)
  
  I'm thinking about creating ANKI flashcards deck with my games positions as a training tool. Is there a way to programmatically (can be whatever programming language, I'll figure it out) generate diagrams from a bunch of FEN strings?
  
  **Tags:** fen, diagram
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2022-02-15. Score: 5 | Accepted answer
  
  You can make use of the online fen2png.com site, calling it with wget or curl:
  
  `curl 'https://fen2png.com/api/?fen=r1b1k1nr/p2p1ppp/n2B4/1p1NPN1P/6P1/3P1Q2/P1P1K3/q5b1%20w%20kq%20-%20-&raw=true' > ~/a.png`
  
  Or you can use a similarly-named python code (which I have not tested):
  
  <https://github.com/tikul/fen-to-png/blob/master/fen2png.py>
  
  
  ---
  
  