ugf2sgf

Unattended on-the-fly conversion of UGF to SGF files
   

Nederlands

 

English


Samenvatting

ugf2sgf is een windows programma dat .ugf en .ugi bestanden, zoals aangemaakt worden door het PandaEgg IGS programma, converteert naar bestanden in het Smart Games Formaat (.sgf).

ugf2sgf doet dit automatisch en voor meerdere bestanden tegelijk. Omdat enkel bestanden die nog niet omgezet zijn worden verwerkt, verloopt dit proces zeer snel.

Ook is het mogelijk deze conversie automatisch te starten nadat PandaEgg afgesloten is. Op deze wijze zijn alle opgeslagen spellen automatisch als .sgf bestanden beschikbaar.
 
Summary

ugf2sgf is a windows program, converting .ugf and .ugi files, as created by the PandaEgg IGS client, to the Smart Games Format (.sgf).

ugf2sgf handles the conversion automatically, handling multiple files in one run. The program skips files converted before, so the proces is very fast.

The conversion can be started automatically after closing down the PandaEgg IGS client. If this functionality is used, all games saved by the PandaEgg IGS client will be available in .sgf format automatically.

Download

Download ugf2sgf.exe (v1.0, 19-03-2006)
Download ugf2sgf.txt (command file, self-explaining)


Achtergrond

De PandaEgg IGS client slaat desgewenst de gamebestanden op. Dit gebeurt in het .ugf formaat. Maar niet alle spel-editors kunnen het ugf formaat lezen. In het bijzonder kan de editor op m'n pocketpc dit niet.

Ik zocht dus naar een manier om eenvoudig alle ugf bestanden om te zetten naar het meer gangbare sgf formaat. Het liefst zonder er naar om te hoeven kijken. Dit heb ik niet kunnen vinden, zodat ik zelf iets gemaakt heb wat wel volgens mijn wensen werkt.

Het resultaat is een schil om de PandaNet client heen, zodat er geen extra acties nodig zijn om de bestanden in het sgf formaat ter beschikking te houden.

En door de gekozen uitvoermap in de synchronisatie op te nemen is het zelfs mogelijk de meest actuele lijst van sgf files op de pda beschikbaar te hebben.
 
Background

De PandaEgg IGS client saves the games played or observed in the ugf format. This format cannot be read by all editors. Especially the editor on my pocketpc cannot read ugf files.

I searched for a program to convert ugf type files to sgf files, which is the most used format outside Asia. The program should do its job without user invention if possible. Unfortunately I didn't found a program which satisfied my needs, so I wrote one myself.

The resulting program can act as a wrapper around the PandaEgg IGS client. No actions are necessary to have an up-to-date list of game files in the sgf format.

Of course it is possible to add the output directory specified to the PDA synchronisation, so the pocketpc will contain an up-to-date list of games in the sgf format as well.

Vergeleken met andere programma's

Er zijn ander programma's die de conversie van .ugf naar .sgf kunnen uitvoeren.
Sommige Go Bord Editors kunnen .ugf lezen en deze weer als .sgf opslaan. Dit is altijd een handmatige actie.

Daarnaast zijn scripts beschikbaar die meerdere bestanden kunnen omzetten. Deze werken meestal vanaf de commando-regel. Onder Windows werkt dit omslachtig en bovendien worden -in de versies die ik gezien heb- bijna alleen de zetten omgezet, en vallen veel gegevens (o.a. alle opmerkingen en veel gegevens over het spel) weg.

Dit programma werkt zonder interactie, voor meerdere bestanden tegelijk. Het converteert ook alle zet-opmerkingen en nagenoeg alle headervelden.

Enkel foto's (het .sgf formaat ondersteunt geen foto's) en variaties (ik heb nog nooit een .ugf formaat met variaties gezien) worden niet omgezet.
 
Compared with other programs

Other programs to convert .ugf to .sgf are available.
Some diagram editors can read .ugf and write .sgf files. They work on a per-file basis and require user interaction.

Scripts are available to convert multiple files at once. Mostly these tools are commandline based, which isn't very windows-like.
The tools I've seen don't do a very good conversion. The moves are converted, most tags and the move-annotation aren't however.

This program does its job without user-interaction and does convert almost all data available.

This program does not convert embedded pictures (the sgf format doesn't support it) en currently this program doesn't do variations (just because I've never seen a single .ugf file with variations).

Handleiding

Sla de bestanden 'ugf2sgf.exe' en 'ugf2sgf.txt' op in een zelf te kiezen locatie. De bestanden moeten bij elkaar in dezelfde map staan. Het txt bestand bevat commando's om de werking van het programma te sturen.
 
Manual

Store both the 'ugf2sgf.exe' and the 'ugf2sgf.txt' files in a directory on your local system. Both files should be in the same directory. The txt file does contain the commands to be executed by the program.
De volgende commando's kunnen gebruikt worden:
  • OUT=<PATH>
    Stel de uitvoermap voor de sgf files in op de aangegeven waarde. Deze instelling blijft geldig tot een nieuw OUT commando een andere map instelt.
    De map wordt automatisch aangemaakt. Indien de map niet aangemaakt kan worden, stopt het programma met een fout.

  • IN=<PATH>
    Start de conversie voor alle .ugf en ,ugi bestanden in the opgegeven map, en alle submappen daaronder. (Alle geconverteerde bestanden komen rechtstreeks in de gespecificeerde uitvoermap terecht, de eventuele submappenstructuur van de invoer wordt niet herbouwd in de uitvoermap).
    Indien nog geen uitvoermap gespecificeerd is, stopt het programma met een fout.

  • CLOSE
    Dit commando stopt het verwerken en sluit het status venster (tenzij er fouten geconstateerd zijn). Samen met het opstarten van de IGS client via dit programma, verloopt de conversie geheel automatisch.
    Wanneer dit commando niet voorkomt, stopt de verwerking aan het einde van de commando file, maar sluit het programma niet af. De gebruiker moet zelf handmatig het programmavenster met het statusoverzicht sluiten.

  • ;
    De puntkomma is het commentaarteken. Deze regels worden overgeslagen.
  The following commands can be used:
  • OUT=<PATH>
    The output directory for the sgf files to be generated will be set to the directory specified. This setting will remain till another OUT command specifies another directory.
    If the directory specified does not exist, it will be created. If the creation of the directory fails, the program will abort with an error.

  • IN=<PATH>
    The program starts converting all .ugf and .ugi files in the directory specified, and all its subdirectories. (All converted files will be written directly to the output directory, the subdirectory structure in the input, if any, will not be recreated in the output directory).
    If no outputdirectory has been specified yet, the program will abort with an error.

  • CLOSE
    The program stops processing and closes its interface (if no errors were encountered). In combination with the wrapping of the Egg program, the conversion will do its job unattended.
    If this command is omitted, the program stops after processing the complete txt file, not closing down. The user must close the status window.

  • ;
    The semi colon is the comment command. These lines are ignored.
ugf2sgf installen als schil om de IGS client

  • Maak een snelkoppeling naar ugf2sgf.exe
    klik met rechts op het programma en kies "kopiëren naar" → "Bureaublad"
  • Voeg het IGS programma toe als argument aan de ugf2sgf snelkoppeling
    klik met rechts op de snelkoppeling van de IGS client, selecteer de tekst in het veld achter "doel" en kopieer dit naar het klembord. Sluit dit venster.
    Klik met rechts op de zojuist aangemaakte snelkoppeling van ugf2sgf, en voeg in het veld achter "doel" een spatie toe en plak daarna de tekst van het klembord. Sluit het venster.
  • Geef de snelkoppeling een logische naam
    Klik met rechts op de snelkoppeling en kies "Naam wijzigen"
  Configure ugf2sgf as IGS client wrapper

  • Create a shortcut to ugf2sgf.exe
    Right-click on the executable and in the contextmenu click "Copy to..." → "Desktop"
  • Add the IGS client program as a parameter to the ugf2sfg shortcut
    Right-click on the shortcut of the IGS client, select all text the field "Target" and copy this text to the clipbord. Close the window.
    Right-click the new ugf2sgf shortcut, and after the field "Target", type a space and then paste the text from the clipbord. Close the window.
  • Rename the shortcut into something you like
    Right-click the shortcut and in the contextmenu click "Rename".

Vragen, problemen
 
Questions, Problems
  • Wanneer je een .ugf file bekijkt in de PandaEgg UGF Editor en deze vergelijkt met een geconverteerd bestand in een willekeurige SGF editor, blijkt het bord vertikaal gespiegeld te zijn. Dit is een fout van de PandaEgg UGF editor! Als je dan toch nog een UGF editor wilt gebruiken, neem dan de versie zoals bij glGo geleverd wordt.
 
  • If you compare an .ugf file in the PandaEgg UGF Editor and the converted file in a sgf editor, you will notice one of them is flipped vertically. The PandaEgg UGF Editor is the faulty one! If you insist on viewing UGF files, better use the UFG Editor which comes as part of the glGo package.

Historie
 
History
  • V1.0
    Eerste vrij gegeven versie.
 
  • V1.0
    First public release.

Copyright

Dit programma is ontwikkelt door Jan van Loenen.
Het mag gratis en zonder beperkingen gebruikt worden.
Wel zou ik het op prijs stellen als je me een e-mail stuurt, wanneer je het gebruikt.
Ook voor vragen, suggesties, ugf files die niet volledig geconverteerd worden (wanneer je ugf files met variaties hebt, zou ik die graag ontvangen) of de specificaties van het ugf formaat kun je contact opnemen per mail.
 
Copyright

This program has been developed by Jan van Loenen.
This program is free to use.
Just send me an e-mail when you use the program.
If you have any questions, tips, ugf files that will not be converted completely (I would like to receive ugf files containing variations) or the specifications of the ugf file formaat, please send me an email.