![]() Saved file (in case you cannot open SVGs, you can at least use a browser such as chrome to view the file): ![]() Python boardtosvg.py 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1' Using python3 and the python-chess library version 0.30.1 import chessį = open("BoardVisualisedFromFEN.SVG", "w")Įxample, FEN: 'rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1'Ĭommand to run your script from the terminal: FEN to SVGįor example, given a FEN as input (say we save our python script as boardtosvg.py) This will allow you to create a SVG-formatted visualisation of any board position loaded using python-chess. You can use the SVG rendering functionalities of python-chess.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |