[Welcome to Sensei's Library!]

StartingPoints
ReferenceSection
About


Referenced by
HowDiagramsWork
GoPrograms
KanazawaProblem46

 

WinMGT to SLF Converter
   

The WinMGT2SLF converter is the utility written by HolIgor which translates WinMGT (TM) ascii output to Sensei's Library Format (SLF (TM) :-) output.

Download
Executable: [ext] http://senseis.xmp.net/files/converter/txtcon.exe
C++ Source: [ext] http://senseis.xmp.net/files/converter/txtcon.cpp.txt

This is a place for comments on the utility.


Procedure

  • In WinMGT go to the board position you want to convert
  • File -> Save board image to -> text file, e.g. as "exercise.txt"

The file should look something like this

    A B C D E F G H J K L M N O P Q R S T
 19 X X X . . . . . X X O O O X X O O . O 19
 18 O X X X . . . X X O . O . O X O O O . 18
 17 O X X . X X . X O O O X O O X . O O O 17

etc...

  • Suppose you have saved that file in the same directory as the program txtcon, e.g. c:\senseis
  • Open the command prompt
  • At the prompt, type "c:\senseis\txtcon c:\senseis\exercise.txt c:\senseis\converted.txt"

The directory "c:\senseis" will then contain a file "converted.txt" with the position in Sensei's Library Format (TM).


To convert a SL diagram to an SGF-file, simply click on the diagram.


Past comments:

HolIgor, awesome contribution !

DieterVerhofstadt


Dieter please cut and paste the first few lines of your source file so we can see what it looks like. The utility works for me. My input is from the 'save board image to text file' command in WinMGT. The file looks like this:

    A B C D E F G H J K L M N O P Q R S T
 19 X X X . . . . . X X O O O X X O O . O 19
 18 O X X X . . . X X O . O . O X O O O . 18
 17 O X X . X X . X O O O X O O X . O O O 17

etc... --DaveSigaty


The utility is very primitive. It does not check if the input file is really a board txt image like the one that is shown above in Dave's comment. It is does not recognize any special marks that could be made by an sgf editor. I wrote it as a simple instrument to make typing the whole board positions semi-automatic.

Let me see your txt file and I can correct the program.

  Holgor

HolIgor you crazy genius!!! -DaveSigaty

Thanks, this is really cool. I'll try it as soon as the phone co. fixes the rain damage to my home lines... Since i don't have WinMGT at work (which is where i usually peruse SL), but do have Jago... what would i need to do to get txtcon to work with Jago? - TakeNGive (11k)


It seems to me that the format of txt image of the board in Jago is similar to WinMGT. So, the utility should work with it. Try it and if the result is somewhat funny inform me about it. A slight modification may solve the problem.

BTW, I believe that the format of the txt image of the position produced by other programs such as sgf2misc is similar, so there should not be any problem with it. Side note, as soon as a tiniest software is produced the real problems of support and portability begin :).

  HolIgor

Jvt asks:

Is there a program for converting Sensei's Library format into SGF?

 HolIgor is the first and only 1 to program something for SLF, AFAIK.

I suppose there are many utilities out there for converting text diagrams into SGF,

 I'm not so sure about that.

but do they accept borders as defined in SLF? If there are several available utilities, which one is the simplest to use?

BTW it would be nice to include such a conversion utility (SGF to SLF and back) in the edit page.

 Has been done in HowDiagramsWork

I can write a servlet if the administrators are interested. Maybe it could be done with JavaScript too, but I don't know much about JS.

About Holigor's utility: maybe the direct links would work if he adds a link (A HREF) to it on his web page. I suspect the web server refuses to retrieve the file if the URL is not accessed from a page hosted on the site, to prevent users from storing files without (local) HTML links.

 The direct links are now on the SL-server itself. --Dieter

Is it possible to use the online SLF to PNG conversion offline by downloading some utility for this purpose? --Robert


My folders have blanks in their name. How to make txtcon accept it ? Dieter



This is a copy of the living page "WinMGT to SLF Converter" at Sensei's Library.
(OC) 2003 the Authors, published under the OpenContent License V1.0.