Swap colors in sgf
Posted: Sat Sep 30, 2017 10:21 am
Hi anyone know of an easy way to swap colors of a sgf file? It's for tsumego files.
Life in 19x19. Go, Weiqi, Baduk... Thats the life.
https://www.lifein19x19.com/
Try sgftf.anpd wrote:Hi anyone know of an easy way to swap colors of a sgf file? It's for tsumego files.
Thanks, looks like that will workzorq wrote:Try sgftf.anpd wrote:Hi anyone know of an easy way to swap colors of a sgf file? It's for tsumego files.
Yes was hoping to avoid that, will try zorq's suggestion. Otherwise I will have to do that.Kap wrote:Well, that's a tad embarrassingI simply assumed Drago would save the changes, but it appears to only be visual.
In that case I'm unfortunately not aware of any software that does what you want.
If worse comes to worst you can always use a text editor with a find-and-replace tool (ctrl + h in the default Microsoft Notepad) to swap the colors of the stones. Since you can replace all occurances of a given string at once this way it's at least better than doing it all by hand...
To swap all pre-placed stones, first replace "AW[" with "PLACEHOLDER", followed by replacing "AB[" with "AW[" and lastly "PLACEHOLDER" with "AB[".
For the solutions, find and replace ";W[" with "PLACEHOLDER", followed by ";B[" with ";W[" and finally "PLACEHOLDER" with ";B[".