Multiple FEN to pgn

Sort:
Oldest
arnavbavane

Hello friends is there a way to save multiple FEN position to save in a single chessbase?

Martin_Stahl
anilbavane wrote:

Hello friends is there a way to save multiple FEN position to save in a single chessbase?

 

Yes, you just have to have all the appropriate PGN fields for each FEN, then you can have a file of as many positions that you want.

arnavbavane
Martin_Stahl wrote:
anilbavane wrote:

Hello friends is there a way to save multiple FEN position to save in a single chessbase?

 

Yes, you just have to have all the appropriate PGN fields for each FEN, then you can have a file of as many positions that you want.

That is my question? How?

Martin_Stahl
anilbavane wrote:
Martin_Stahl wrote:
anilbavane wrote:

Hello friends is there a way to save multiple FEN position to save in a single chessbase?

 

Yes, you just have to have all the appropriate PGN fields for each FEN, then you can have a file of as many positions that you want.

That is my question? How?

 

You basically asked if you could store multiple FEN positions in a single file/database. That was the answer.

 

If you are using something like Chessbase, you can just create a new game, set up the board with your FEN, save, and do a new one. You could also create a PGN with multiple FEN positions, and import that, but it requires a minimum number of PGN fields to do.

 

If that isn't what you are asking, maybe you could clarify what you are wanting to do.

NaxyOnChess
What file
arnavbavane

These are the FEN diagrams I am talking about...I can copy it one by one but it will take time.Is there a shorter way

[FEN "r5k1/2q2ppp/1p1Qp3/2n1n3/r3P3/P1P1BP2/3RNKPP/7R_b_-_-_0_1"]

[FEN "5bk1/5p2/7p/4Q1pn/3P2K1/4NPPP/2N2q2/8_b_-_-_0_1"]

[FEN "2r1r1k1/1bqnbppp/ppp5/5P2/2NNQ3/4P3/PP3PBP/2RR2K1_w_-_-_0_1"]

[FEN "r3r1k1/pppbqp1p/3b2p1/4n1B1/2N1n3/2Q2NP1/PP2PPBP/R4RK1_w_-_-_0_1"]

[FEN "5rk1/1br5/pp1p2qp/3Pnp1n/PP5B/N6P/2BQ2PK/2R2R2_w_-_-_0_1"]

[FEN "r3r1k1/pp1q1ppp/2ppb3/8/1bP5/4P1P1/PBQP1PBP/R4RK1_w_-_-_0_1"]

[FEN "r1b1r2k/ppq3b1/2p2npp/P7/1P2N2Q/2P3PP/1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PP/1R4K1_w_-_-_0_1"]

[FEN "4r1k1/5p1p/pqn1p1p1/N2pb3/1P6/P5P1/5P1P/1R1Q1BK1_w_-_-_0_1"]

[FEN "4r1k1/2p2pp1/2r1n1p1/1p6/1P2R1Pb/2PP4/2BB1P2/R5K1_w_-_-_0_1"]

[FEN "2rq1rk1/p2pbppp/1pb1pn2/n7/1PP5/3Q1NP1/P2NPPBP/1RB2RK1_b_-_-_0_1"]

[FEN "6r1/1ppq3k/n2p4/p1nPp2B/2P1Pr1P/2N1Q1R1/PP6/2R3K1_b_-_-_0_1"]

[FEN "4rbk1/5p1p/q5pP/2p1P3/1n1pQ3/5NP1/4RPK1/3R4_b_-_-_0_1"]

[FEN "2r3k1/r1q4p/p3pBp1/1p1bP3/4p1Q1/2P5/PP2BbP1/1K1R3R_w_-_-_0_1"]

[FEN "4r2k/7p/p5q1/N1P5/Q2P2p1/7P/5RP1/6K1_b_-_-_0_1"]

[FEN "4rbk1/2qr1pp1/7p/ppnB1Q2/7P/2B3P1/PP1R1P2/3R2K1_w_-_-_0_1"]

EscherehcsE

@OP, you're the second person in the last week or two who's asked that type of question. In theory, yes, there's an easier way, but you'd have to learn how to write script files. Writing the script file handles the task automatically and takes the manual labor out of the picture.

I haven't learned that skill yet, but I hope to get there in the near future. One complicating factor for me is that I recently moved from Windows to Linux. For Windows, probably the best program for scripting would be AutoHotkey. Sadly, AutoHotkey isn't supported in Linux, so I'd probably be forced to use Autokey in Linux. I think scripting in AutoHotkey is a bit easier than scripting in Autokey, due to the fact that Autokey scripts are actually written in Python. (In general, Python scripts are more powerful than AutoHotkey scripts, but they're a bit harder to write.) Of course, in Linux, I'd also have to learn the basics of Python.

So, my two choices are to fire up the old Windows hardware and learn AutoHotkey, or stay in Linux and learn Autokey and a bit of Python.

P.S. In your FEN strings, I think the underscores will be a problem. I think you'll have to replace the underscores with spaces.

 

EscherehcsE

Just a quick update - I couldn't ignore the challenge, so yesterday I finally got around to installing AutoHotkey on my old Windows machine. It didn't take too long for me to stumble around and figure it out enough to make the conversion. My first AutoHotkey script! I'm sure it's a horrible script, but at least it works.

If you're still interested, I could upload the pgn to Sendspace.

EscherehcsE
chessmine2020 wrote:

HI

Is there a software? so that I have loads of files.

I got one software called fen2pgn but some how in pgn file all positions are showing as white to play, but few are black to play what to do?

[FEN "8/1b2k1p1/1p2p2p/1p6/4P1PP/P1P5/1N5K/8w--0 1"]
[FEN "8/4k2p/1pp3n1/8/2N5/P4PP1/4K3/8 b--0 1"]
[FEN "8/p5k1/1p1r1pp1/1P6/2Pp4/3K2BB/5P2/8 b--0 1"]
[FEN "3k4/1bp3p1/8/pp1Np2P/8/P1P3P1/1P3K2/8w--0 1"]
[FEN "5r2/8/2k3np/2pbR2p/3p4/3P2P1/2PNN2P/4K3w--0 1"]
[FEN "8/p1p1k2p/P2n1pp1/P1bR4/8/1K3P1N/6P1/8 b--0 1"]
[FEN "8/p1p1k3/4p2p/4P1b1/2NP3P/1P4K1/8/8 b--0 1"]
[FEN "8/6k1/1p6/q3p3/2B1P3/2P2P2/R2K4/8 b--0 1"]
[FEN "7r/1p2kp2/1pb2pp1/n2Q4/3P1N1P/6P1/1P1K4/8w--0 1"]
[FEN "4r3/1k4bp/1p2b1p1/2p5/2P2p2/1P2N3/2P2PKP/3R1B2w--0 1"]
[FEN "8/1np3kp/5pp1/3Q4/1p6/1P5P/4r1PK/8 b--0 1"]
[FEN "r7/8/4k2p/3b2p1/2pp4/5RP1/1PP2P2/1KB5w--0 1"]

These are those fen files


Could you give me the download link for the fen2pgn utility? I'd like to take a look at it.

Edit - Nevermind, I didn't realize I already have the program on my old Windows hard drive. I'll try to take a look at it sometime later when I have some time.

But I can tell you right now that your spacing in the FENs isn't right. For example, the first FEN should be:

[FEN "8/1b2k1p1/1p2p2p/1p6/4P1PP/P1P5/1N5K/8 w - - 0 1"]

(Notice the spaces I added after the last 8, the w, and the two hyphens.)

That may well be your problem with the "black to move" showing up as "white to move".

 

EscherehcsE

@chessmine2020, is this the same Fen2Pgn program that you're using?

https://web.archive.org/web/20120204045515/http://www.chessville.com/downloads/misc_downloads.htm#FENtoPGN

I ran this program through VirusTotal, and it got about 6 hits out of 60. So, maybe it's a bit questionable. Plus, when it converts a Fen to Pgn, it doesn't do a great job. It doesn't create all of the desired 7-tag roster, it doesn't create the desired [Setup "1"] tag, it doesn't create empty lines between the games, etc. It's not really a program I'd want to use.

Also, how many Fen positions do you need to convert?

 

EscherehcsE
chessmine2020 wrote:

HI

Is there a software? so that I have loads of files.

I wrote an AutoHotkey script to convert the FEN file for @arnavbavane. But I'm a complete beginner at using AutoHotkey, and while the script file worked, it's a terrible kludge. The script is completely dependent upon the formatting of the FEN file. If the formatting changes, the script will have to be edited to account for those changes. Oh yeah, I used the full file paths in the script, so those will have to be edited regardless. It's nothing I'm proud of, but I guess we all have to start somewhere. :-)

EscherehcsE
chessmine2020 wrote:
EscherehcsE wrote:

@chessmine2020, is this the same Fen2Pgn program that you're using?

https://web.archive.org/web/20120204045515/http://www.chessville.com/downloads/misc_downloads.htm#FENtoPGN

I ran this program through VirusTotal, and it got about 6 hits out of 60. So, maybe it's a bit questionable. Plus, when it converts a Fen to Pgn, it doesn't do a great job. It doesn't create all of the desired 7-tag roster, it doesn't create the desired [Setup "1"] tag, it doesn't create empty lines between the games, etc. It's not really a program I'd want to use.

Also, how many Fen positions do you need to convert?

Hi

Yes its not working great thats why checking if you have any , i wanted to conver pdf books to pgn so many files of fen around 1000

So you're manually converting diagrams in pdf books to FEN positions, then to PGNs? That seems very labor-intensive and prone to mistakes. I'm assuming that there are no moves involved? (My script doesn't handle any moves.)

Other than the AHK script that I wrote, I don't know of any other FEN to PGN programs other than the one I posted from the Internet Archive.

And, my AHK script isn't really user friendly. (I didn't really intend for it to be used by other people.) It simply copies the FEN tag from the FEN input file and pastes it into a PGN output file. If there is a mistake in the FEN string, that mistake will get carried over to the PGN file.

Also, the script assumes that the FEN input file is double-spaced (that is, a blank line between each FEN string). If your FEN input file is single-spaced, you'd have to modify the script to account for that.

Also, the file names and full paths of the FEN input file and the PGN output file are hard-coded into the script. (I haven't learned about file handling yet, lol.) That means you'd have to edit the script to change the file names and paths every time you used the script.

If you just had one large FEN file of 1000 FENs, you'd only have to run the script once. However, if you have a lot of small FEN files, you'd have to run the script many more times. I could send you my script, but you'd have to install AutoHotkey (AHK) onto your Windows PC, and you'd have to be decent with using text editors.

So, I could send you my script if you're willing to get your hands dirty and edit the script file for every use. Or, if you simply have one large FEN file with no mistakes, you could send me the FEN file and I could do the conversion for you.

Keep in mind that I'm a beginner with using AHK, and the script is terribly crude. (This is my first AHK script, and I was winging it the whole time, lol.)

Forums
Forum Legend
Following
New Comments
Locked Topic
Pinned Topic