[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Joining or including .sgf games
From: |
Jim Segrave |
Subject: |
Re: [Bug-gnubg] Joining or including .sgf games |
Date: |
Wed, 30 Jul 2003 23:12:38 +0200 |
User-agent: |
Mutt/1.2.5.1i |
On Wed 30 Jul 2003 (17:45 -0300), Albert Silver wrote:
> Hi,
>
> I have a problem. I'm in the process of preparing a very long
> and detailed analysis of a match file. There are many rollouts in it,
> but I've encountered a mistake in the 18th game's notation. I know how
> to start a game over or continue from a certain point, so I can easily
> overwrite the last moves of the game, but doing so will erase the
> subsequent 11 games as well. How can I re-attach the following 11 games
> to the main file without losing the information accumulated in the first
> 18 games? I'd like to preserve the statistics of the entire match,
> otherwise I'd just split them in two files.
Each game in the sgf file for a match begins with a line:
(;FF[4]GM[6]CA[UTF-8]...[game:xx] ...
the game ends with a closing parenthesis ')'
The game numbers go from 0 to whatever, so the one you want is game
17.
What you can do:
1) make a copy of the game file, call it something like head.sgf
2) make another copy of the game file - say tail.sgf
3) with a text editor, edit head.sgf, find the text [game:18] and
delete that line and every following line. Use a text editor, not a
word processor.
4) edit tail.sgf and delete from the beginning up until (but not
including) the line containing the text [game:18]
5) start gnubg and open head.sgf. Go to the point in game 18 where
things need fixing and do what's needed, save it out again when
it's right.
6) you then combine head.sgf and tail.sgf either by editing head.sgf
and inserting tail.sgf at the end or by doing something like:
C:> cat head.sgf tail.sgf > both.sgf
If things go wrong, you've still got your original file.
--
Jim Segrave address@hidden