Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

software needed

0 views
Skip to first unread message

Mace

unread,
Feb 26, 2003, 10:58:50 AM2/26/03
to
I need some software to read SGF files with variations and export the
main branch of the games only. Is there such software around? Thank
you.

MENON Jean-Francois

unread,
Feb 26, 2003, 2:07:00 PM2/26/03
to

well, if you plan to use RubyGo, I can easyly add a patch for you :->
jf

--
_________________________________________
/ do you play Go? \
|http://jeanfrancois.menon.free.fr/rubygo |
\ /
-----------------------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||

jan van rongen

unread,
Feb 26, 2003, 4:23:20 PM2/26/03
to
mac...@yahoo.com (Mace) wrote in message news:<d7b61869.03022...@posting.google.com>...

> I need some software to read SGF files with variations and export the
> main branch of the games only. Is there such software around? Thank
> you.

The best thing I can think of is to take Kombilo's SGF-parser which
can read in the full game and can output the main branch. You need
Python to get it all working. If you want it I have a simpler Python
program that does the same, but I know it might fail more often than
the Kombilo parser -- in theory, it has never let me down until now.

Jan van Rongen

Richard Hunter

unread,
Feb 26, 2003, 4:25:52 PM2/26/03
to
Smart go board (Mac OS9) will delete all branches except the main one
leaving a clean text file.


Mace <mac...@yahoo.com> wrote:


--
-----------------------------------------
Richard Hunter, living in Tokyo (email: hunter at gol dot com)

Joel Olson

unread,
Feb 26, 2003, 4:48:19 PM2/26/03
to
Mace asks:

<
I need some software to read SGF files with variations and export the
main branch of the games only. Is there such software around? Thank
you.
>

This may be wrong, but I think the structure of the .sgf is like:
{
Header
(
Body
(variation1)
(variation2)
)
}

So any script that will delete the internal parantheticals should reduce it
to the main branch only.


Anders Kierulf

unread,
Feb 26, 2003, 7:15:08 PM2/26/03
to
> I need some software to read SGF files with variations and export the
> main branch of the games only. Is there such software around?

SmartGo for Windows also includes a command to delete all the variations
(Edit > Delete Nodes > "Delete branches (keep main sequence)".

Anders Kierulf
www.smartgo.com


Mike Vaughn

unread,
Feb 26, 2003, 9:57:02 PM2/26/03
to
In article <d7b61869.03022...@posting.google.com>,
mac...@yahoo.com (Mace) wrote:

Mace,

Just one caution -- different SGF version (or SGF writers) use different
ordering for the variations. Sometimes the top line is the main
variation, sometimes not. But if you play through the games, then you
will be able to detect the main variation, and chop off the side
variations as you go.


Best,
Mike V

William M. Shubert

unread,
Feb 27, 2003, 12:09:13 AM2/27/03
to
Joel's advice on scriptwriting is indeed incorrect. SGF files can have
very complex variations nested inside each other; often they are
multiline; and there can be parenthesis in comments, meaning that you
would need a pretty complex script to identify which parens are for the
variations and which are from comments.

CGoban (1 and 2) can both delete variations with the "cut" button, but you
have to manually go to each variation and cut it out, so it isn't an
automatic process.

If you really want an automated system, download
http://www.igoweb.org/~wms/stripper.jar and run it with "java -jar
stripper.jar <in.sgf> <out.sgf>" (requires java 1.3). I just wrote it;
since I already had an SGF library, it was only about 20 lines of code.

0 new messages