Hello, thats problably a really dumb/easy question, but:
I need a program wich converts a pgn into fen.
First, I thought about writing some code with the python-chess libary, but then I found a github project, that does what I need: GitHub - SindreSvendby/pgnToFen: Takes PGN as input and returns FEN
The problem is, I don’t know wich code I have to run, because the only code that works is pgntofen.py, which gives me 27 FEN’s, which are problably one game. But I didn’t find the input in the code, so I’m not able to change it
Do you know how to run this code, or is there any other program/code (with python chess)?
In the end, I want to get many FEN’s and with these I wantet to analyze them with an engine to get the best move for this FEN.
e.g: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 best Move: ‘d4’
I tought of using this project for the second step: GitHub - fsmosca/chess-artist: A python script that can annotate chess games in pgn file with static evaluation or search score of an engine, can annotate an epd file with acd, acs, bm, and ce opcodes, can test engine with epd test suite and can generate chess puzzles.
Does anyone knows if this is possible, or even better, without ever converting it to FEN?
Thank you for your answers!