pgn merger

Sort:
TuckerTommy
I’m sorry but this is not working out....the file reads .pgn and not pgn.txt on my computer....I did replace the brackets but still no luck.
vickalan

Correct me if I'm wrong, but I believe pgn files can be opened amazingly easy on any Windows-based PC. Just right-click the file, and choose "Open with = Notepad" (a blue notebook icon).

It's just a plain text editor. You can make that your default editor for pgn files. You can open as many files as you like, and copy and paste as much as you want.

I've used it to open the pgn file of the recent chess.com engine tournament data which is hundreds of games with annotations. The file is a few MB but Windows Notepad works fine for it.happy.png

EscherehcsE
TuckerTommy wrote:
I’m sorry but this is not working out....the file reads .pgn and not pgn.txt on my computer....I did replace the brackets but still no luck.

I really hate Microsoft. Why do they hide file extensions by default? Argggg.

The situation is probably as Martin hinted at in Post #12 - You have the file extensions hidden by default. You'll want the file extensions to be shown by default.

To do this, open up a Windows Explorer window, then in the menu at the top, select "Organize --> Folder and search options". Then, in the "Folder Options" window, click on the "View" tab. Find the advanced setting named "Hide extensions for known file types". (I'm sure it will be checked.) Uncheck that setting, then click on "Apply", then "OK".

After doing that, I'll bet that your pgn file will now be named "Combined.pgn.txt".

Martin_Stahl
TuckerTommy wrote:
I’m sorry but this is not working out....the file reads .pgn and not pgn.txt on my computer....I did replace the brackets but still no luck.

 

Is it that the program isn't opening the file at all or that it can't even see it?


If the latter, when you browse to where you saved it, when trying to open in your app, can you change the file selection option to All Files from *.PGN?

null

that's not from your program but it should have a similar layout.

EscherehcsE
vickalan wrote:

Correct me if I'm wrong, but I believe pgn files can be opened amazingly easy on any Windows-based PC. Just right-click the file, and choose "Open with = Notepad" (a blue notebook icon).

It's just a plain text editor. You can make that your default editor for pgn files. You can open as many files as you like, and copy and paste as much as you want.

I've used it to open the pgn file of the recent chess.com engine tournament data which is hundreds of games with annotations. The file is a few MB but Windows Notepad works fine for it.

Yeah, Notepad is fine for basic editing of smaller text files, including pgn files. But it doesn't have many features, and if the file gets large enough, Notepad will choke on the file size.

vickalan
EscherehcsE wrote:

...and if the file gets large enough, Notepad will choke on the file size.

Yes, I actually just re-opened the engine tournament collection. It responds slowly when I want to just add a line in the middle of the file. A little annoying (or worse) for very big text files. Not sure if it's cpu dependent, but I would say expect slow response to cursor commands at 1MB or bigger.meh.png

TuckerTommy
EscherehcsE, I did uncheck the feature as you stated and it now reads .pgn.txt like you stated. Now when I right click on them I don’t have the rename option.
TuckerTommy
When I open it it only sees one game.
Martin_Stahl

Since it is a DB program, it should have a way to move between games in the file. Is it only showing one game in the Game List panel?

TuckerTommy
I’ve done this quite easily with chessbase when I had a bootleg copy before my computer crashed. Chessbase is too pricey right now....anyone know where I can obtain a copy?
EscherehcsE
TuckerTommy wrote:
EscherehcsE, I did uncheck the feature as you stated and it now reads .pgn.txt like you stated. Now when I right click on them I don’t have the rename option.

I have no idea why you don't have the rename option. I'll have to think about that one.

Martin_Stahl

I installed the program and downloaded your file; the program does not like .txt files. Renaming it works though. Try single-clicking the filename, hit F2 on your keyboard and see if that will allow you to rename. You'll want to do that when the file is not open in the program.

EscherehcsE

I hope the F2 keyboard shortcut works; I can't think of a reason why you wouldn't have the rename option available when right clicking the file. Based on the Microsoft answers to these kind of problems, it appears to be a glitch or bug that sometimes hits people, and the answer is usually a reinstall of Windows or a registry hack. (Neither one is a good solution.)

 

Which version of Windows are you using?

TuckerTommy
Win 10....I’m trying to fix my chessbase....it has waaay too many databases of old games so I get a msg saying “remove rarely used database” when attempting to open...trying to clean up databases.
TuckerTommy
How do I combine all the pgns to read as one game? I mean so that the pgns read as variations in one game...hope I make sense....my chessbase is back fully functioning.
TuckerTommy
Great...the search is over ....Chessbase has a feature after the “select all games” is selected that reads “merge selected games”. This puts all the games a variations in one game...using numbers like 2c1a...etc to label the “branded tree”. Thanks guys. This might be in other PGN annotations like chessX too.
Olle_Eriksson

I looked everywhere for a command line tool to merge PGN's into one (and I mean really merging the PGN games into one game with variations, either from one file, or from separate files). I found one Python script on GitHub that I modified to have support for also merging text comments and also software comments / annotation (arrows and circles etc). There are some technical caveats but it works:

https://github.com/olleeriksson/merge-pgn

For those who can't be bothered to install python, and who doesn't have Chessbase, chesstempo.com is another free tool that also does real PGN game merging, but there are some issues with that. In order to get a clean merge, you have to remove all existing repertoires and reload the page before uploading the PGN files to merge, and then export them. If you are already using the opening trainer at chesstempo.com you would have to first export/backup your repertoires and then re-upload them afterwards which could be a nuisance. Also, while it does merge the text comments, it doesn't really merge the annotations (arrows and circles), and it will also include annotations from repertoires of the opposite color (hence the reason why you need to remove all repertoires before you begin). There is a discussion regarding these subtleties at https://old.chesstempo.com/chess-forum/help_and_support/any_way_to_delete_cal_comments_from_repertoire-t11246.0.html;msg76376#msg76376.