pgn2sgf
Version as of March 2nd 01
What?
This little tool, written in Java, converts PGN, the format the server ItsYourTurn saves game-records in, into the common SGF-format for which several viewer already exist.
You will have to have Java installed or Microsoft Windows running in order to get this to work!
Having unzipped pgn2sgf.zip you will get a file called pgn2sgf.jar.
Running it
- If you have Java installed, start the program by
java -jar pgn2sgf.jar file-to-convert [boardsize] [handicap]. - Or, if you use Windows, by
jview /cp:p pgn2sgf.jar pgn2sgf file-to-convert [boardsize] [handicap]. - Or, if your version of Java does not support the -jar-switch, try:
java -cp pgn2sgf.jar pgn2sgf file-to-convert [boardsize] [handicap]
The parameters [boardsize] and [handicap] are optional. You can use none, one of both or both. If you don`t provide these parameters the converter will assume a board of 19x19 grids and no handicap. (These parameters are needed because IYT does not provide these information in their PGN-records.) You must use h and b to indicate the meaning of the argument!
e.g.: type java -jar pgn2sgf.jar mygame.htm h4 s13 to convert mygame.htm with 4 handicap-stones on a 13x13 board.
Make sure you have PATH set correctly and that you are in the right directory.
You can automate the use a bit. I use pgn2sgf like this: i save the pgn as files always in the same directory. The saved files always have the same name. I wrote a script-file, that starts pgn2sgf with this file as argument. So I get a sgf-file that I will rename later on. Be aware that saving another game and converting it that way will overwrite an old one. So rename it before you process a new one!
Download
- runnable jar (zipped)
- sourcecode (zipped)