Page 1 of 2
Merging two or more sgf files?
Posted: Thu Jun 21, 2012 3:00 am
by Sadaharu
I was wondering if it is possible to merge two or more sgf files together into one sgf file.
That is, the final one sgf file will contain the data in all the sgf files(in the form of variations), and also the comments, if possible.
Is there a software that can do this?
I tried Drago but it doesn't work.
And CGoban only allows you to cut and paste in the same SGF and not from one SGF to another.
Merging two or more sgf files?
Posted: Thu Jun 21, 2012 11:01 am
by Alberich
I discovered the answer to this just this afternoon. I've been playing against GNU Go using the CompoGo SGF editor and discovered when resuming saved SGF files the program was creating duplicate copies of the same game in the same file. It was continuously merging differences in the same game in one file. So I'd imagine it might be possible to save two or more games in the same SGF file using CompoGo.
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 11:13 am
by Javaness2
SGF allows you to store more than 1 game in the same file.
I don't know offhand what software will do that for you easily

Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 11:15 am
by Sadaharu
Javaness2 wrote:SGF allows you to store more than 1 game in the same file.
I don't know offhand what software will do that for you easily

Yup that's why I'm looking for a way to do that without needing to manually inputting the moves~
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 11:16 am
by Sadaharu
Alberich wrote:I discovered the answer to this just this afternoon. I've been playing against GNU Go using the CompoGo SGF editor and discovered when resuming saved SGF files the program was creating duplicate copies of the same game in the same file. It was continuously merging differences in the same game in one file. So I'd imagine it might be possible to save two or more games in the same SGF file using CompoGo.
Thanks! I will give it a try
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 2:40 pm
by Alberich
Sadaharu wrote:Alberich wrote:I discovered the answer to this just this afternoon. I've been playing against GNU Go using the CompoGo SGF editor and discovered when resuming saved SGF files the program was creating duplicate copies of the same game in the same file. It was continuously merging differences in the same game in one file. So I'd imagine it might be possible to save two or more games in the same SGF file using CompoGo.
Thanks! I will give it a try
I've done more research on this topic. Here are the editors that accept multi joined SGF files:
1. CompoGo
2. GoHome
3. Kombilo
4. Dariush
Surprisingly Drago can't open multipart SGF files. Neither can CCoban 3 nor gGo. I don't know about the iPad versions of Go. Would be interesting to know if Easy Go or Smartgo Kifu accept multi part SGF files. Of all the editors I mentioned...I believe Dariush has the simplest GUI for creating multipart SGF files. I don't know the limitations of how many files per multipart SGF files can be created safely without corruption though. That could be a concern.
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 3:33 pm
by smartgo
SmartGo Kifu can open SGF files that include multiple games.
However, note that multiple games in SGF are not merged into a single game tree; the file is just a concatenation of the individual games, making it easier and more efficient to deal with game collections. So if your goal is to combine multiple versions of the same game using variations, this may not help you.
Merging two or more sgf files?
Posted: Thu Jun 21, 2012 4:20 pm
by Alberich
smartgo wrote:SmartGo Kifu can open SGF files that include multiple games.
However, note that multiple games in SGF are not merged into a single game tree; the file is just a concatenation of the individual games, making it easier and more efficient to deal with game collections. So if your goal is to combine multiple versions of the same game using variations, this may not help you.
I'm glad to hear Smartgo Kifu accepts multi-part SGF files. When I import the multi part file how do I select the game I want to view? Does it pop up a dialog box asking me to select the game to view?
I have to disagree with you on this one point though...you can save the same game with multiple variations. The trick though, is to open and save the game with different filenames otherwise the program will refuse opening the file because it will say to close the current game because it is in use. So it is possible to do this once you get around that limitation.
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 4:28 pm
by smartgo
Alberich wrote:When I import the multi part file how do I select the game I want to view? Does it pop up a dialog box asking me to select the game to view?
All the games in the imported file will be added to the games list in My Games, and you just select the game you're interested in.
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 5:05 pm
by Alberich
smartgo wrote:Alberich wrote:When I import the multi part file how do I select the game I want to view? Does it pop up a dialog box asking me to select the game to view?
All the games in the imported file will be added to the games list in My Games, and you just select the game you're interested in.
I hope we get a variation list option someday so we can look at the game score and tap on the move to go directly to that point in the game for study instead of using the slider.
Re: Merging two or more sgf files?
Posted: Thu Jun 21, 2012 11:54 pm
by Sadaharu
smartgo wrote:SmartGo Kifu can open SGF files that include multiple games.
However, note that multiple games in SGF are not merged into a single game tree; the file is just a concatenation of the individual games, making it easier and more efficient to deal with game collections. So if your goal is to combine multiple versions of the same game using variations, this may not help you.
Yes, I'm not looking for a way to put multiple games in a single SGF. Rather, I want the multiple games to be in a single game tree, in the form of variations. Naturally there will be some overlapping moves, and they will be resolved in the game tree under the same move.
So basically it is still a single sgf but it contains many games merged together in the form of variations.
Is there a software which can do this?
Re: Merging two or more sgf files?
Posted: Fri Jun 22, 2012 12:56 am
by Gilles
Alberich wrote:Surprisingly Drago can't open multipart SGF files.

Basic feature since first releases. Can even open sgf folders. I am curious about what could have failed.
Re: Merging two or more sgf files?
Posted: Fri Jun 22, 2012 1:10 am
by Gilles
Sadaharu wrote:So basically it is still a single sgf but it contains many games merged together in the form of variations.
Is there a software which can do this?
Drago can with some limitations: only main branches of input games are processed and comments are not kept. It has been designed to make game trees like
Arno's fuseki database.
Start it from File > Collections > Make game tree.
Re: Merging two or more sgf files?
Posted: Fri Jun 22, 2012 1:44 am
by Sadaharu
Gilles wrote:Sadaharu wrote:So basically it is still a single sgf but it contains many games merged together in the form of variations.
Is there a software which can do this?
Drago can with some limitations: only main branches of input games are processed and comments are not kept. It has been designed to make game trees like
Arno's fuseki database.
Start it from File > Collections > Make game tree.
Thanks! I've just tried it and yes, it works.
However, is it possible for this function to include sub-branches as well? Because I'm currently building a sgf like this myself and if I use this function I will have to go and look for the sgf of all those kifus I've already input.
Also it means I can't "add-on" to an already existing sgf file like this?
Re: Merging two or more sgf files?
Posted: Fri Jun 22, 2012 2:28 am
by Gilles
Sadaharu wrote:However, is it possible for this function to include sub-branches as well?
Sorry, this is one of the limitations and would require some work and a new release.