SGF Organising Utilities

    Keywords: Software

As a result of a discussion on rec.games.go kicked off by Michael Lowe I wrote a quick perl program, and thought it would be a good idea to collect SGF Utilities here on Sensei's Library.

Table of contents

SGF to SGF

Filters that remove information

CommentFilter by Chris Goldsmith

To start the ball rolling here is the quick program I wrote to filter comments (chatter) out of SGF files, it currently is focussed at files downloaded off of KGS, but can easily be adapted to handle other go servers.

removeTag

Here is another perl program, this one removes any sgf properties you don't want, and empty comment nodes too.

[ext] KibitzCleaner by Blubb Fallo

This is a very small Python script similar to CommentFilter, but also capable of filtering based on players' ranks.

The link to sourceforge is dead.

Smartgo

Smartgo allows editing of sgf files. It can remove any specified attribute (also comments) from an sgf file. It also allows changing the main line or removing branching from sgf files. It can create diagrams from sgf files.

[ext] SGFC - Removing Comments and more

Dieter: Has someone written a tool which extracts comments from sgf-files into text-files ? As the editor of the Belgian magazine, this would considerably reduce the workload of converting contributed commented games to articles in Gowrite.

(Sebastian:) Yes, our very own Arno has written a tool that does this and much more: [ext] SGFC - all you need to do is check the "delete property" box and enter "C" for "comment" in the text box like this:
http://www.seedwiki.com/Accounts/Helm_Sebastian_8957/sgfc.png

LauriPaatero: in GOWrite 2 (2.1.x) you can export game in graphics and HTML. Result is HTML file with comments and links to graphics (EPS or PNG).

Filters that add or merge information

Soksoo Database

eats many sgf files and saves the corner play sequences (joseki and similar) to a new sgf

SGF Merge Trees

Such a tool would be able to merge multiple games into a single tree (same moves must be merged into one node, comments concatenated, conflicting properties detected and warnings displayed ...).

SGF Collection Tools

Proposal:

Since sgf allows multiple games in one file (sgf collection), there should be a tool to manage such collections (and since most editors support only one sgf tree per file it should be a external tool). It should allow to:

  • show a list with all games (with general properties like PB, PW, RB, RW, ...)
  • open one game in game-specific editor (by GM property) by saving it to temporary file
  • if the temporary file is edited, it can be integrated back into the collection (just remember positions of '(;' and ')' to modify the block); backup file needs to be created

The parser would be pretty simple, compared to full sgf parsing (just skip most parts ...).
The whole tool should be game independent (not just Go).

willemien for go only games collections: SmartGo can do this. I am not sure about Drago

SGF Tree to SGF collection tool

willemien I wrote a very basic tool that takes an SGF tree and transforms it into a Sgf collection. (Every path from the root to a leaf/ end node becomes a new game) I am not a great programmer (and the program fails sometimes, but it would be a good idea if somebode(who is better in programming than me) writes a foolproof version.

SGF Statistics

MtnViewMark: I have recently taken Arno's sgfc source and build a program that processes collections of SGF files and produces statistics on property and value usage. The [ext] source is available.

I ran it over about five thousand SGF files from the GoDatabases page and all five thousand problems from GoProblemsCom with interesting results:

  • Other than text comments (C and N), move and node annotation is basically never used.
  • The graphic markup (AR, LN, and DD, is never used. Nor is SL.
  • The character set (CA), if ever specified, is almost always UTF-8.

Full details are available: [ext] game-stats.txt and [ext] problem-stats.txt

Yes - I realize this isn't quite the right place in the library for this info... open to suggestions!

BramGo: Your observations of the use of the (CA) just can't be correct. My guess is that most of your sources are websites in English. I've been downloading files from all kinds of asian websites as well, and I've seen a lot of different values in this tag.

Other Formats to SGF

  • For perl programmers, you can check out the Games::Go::Image2SGF CPAN module, which uses image recognition to create SGF diagrams from photographs of a go board.

SGF to Other

[ext] Peter Strempel's Format Conversion Utilities

[ext] Daniel Maslo's SGF to PDF Conversion Online tool

[ext] SGFtoKifu

SGFtoKifu is a program for generating images containing kifu diagrams from SGF files. It is especially useful if you want to print a game you have in this format to review in a real board.

[ext] PhotoKifu

[ext] PhotoKifu (for Windows), now superseded, created a kifu in PNG format from a preexistent SGF file. It managed handicap stones either Chinese or Japanese but it ignored variations and multiple games in the same file.

[ext] Sgf thumbnail images

Creates thumbnail images of sgf files in your directory listing. For linux systems with gnome2 or gnome3 and nautilus.

Claint: I have gotten these tools working, they are great, but I had to fix 2 bugs in the program to get it to work in gnome2. I'll try to put it somewhere when I get around to it.

Converting sgf to pdf: sgf2dg free software

sgf2dg package in Linux systems has utilities that can convert an sgf file into tex, pdf and some other formats. (Replaces the older sgf2tex package, which basically also used to do the same thing.)

Detect faulty tsumego

Perl script that looks through all the sgf files in a directory and prints out a list of those where the first move and the last move are different colours. Is confused by variations.

Diverse to SGF

Image to SGF:

GoCam

CompoGo

CompoGo [ext] (CompoGo homepage) eats a picture and gives a diagram to save as SGF file

Chris Ball's [ext] image2sgf

[ext] Go Tracer (dead link)

[ext] VideoKifu

[ext] VideoKifu (for Windows) reconstructs the whole move sequence of a Go game from a possibly unattended video feed, either live or deferred. It produces an SGF file and a game record.

First public release (demo version) published on July 14th, 2017.

Text to SGF

  • [ext] JText2Sgfs is a Java program, that eats text files (e.g. a Mozilla mailbox), extracts sgf-data and saves them to SGF files.
  • The same did SplitGo (for Java) by Ray Tayek. This program disappeared from the net.
  • A tool to convert a text diagram from rgg to SGF (there is at least one)?

==See also ==


SGF Organising Utilities last edited by 95.234.231.242 on July 14, 2017 - 16:04
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library