![]() ![]() to display it but you may also put string directly in HTML. It needs files board-0.svg, board-1.svg, etc. # add image `board-0.svg`, `board-1.svg`, etc. ![]() # save string in file with name `board-0.svg`, `board-1.svg`, etc. You need only loop to create HTML with all moves and images import chessįor number, move in enumerate(game.mainline_moves()): In documentation I found function () which generates string with SVG image - and you can save in file using standard open(), write(), close()Įvery browser can display image svg in HTML Thanks in advanceĬommand board.san(move) gives current move as text and you can keep it on list to save it later. I am trying to figure out if the above data (i.e individual move and their image) can be exported to HTML or CSV format, so that i can analyse the moves, as it is difficult to analyze in jupyter. I am able to obtain the output (see the image below) in jupyter for each moves and their corresponding board image (inside a scrolled window in jupyter) #Printing and displaying the moves in algebraic notation # Converting the string into StringIO object I have used the post ( Printing individual moves with the python-chess library) to obtain the individual moves and display image of the chess board. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |