Posts Tagged ‘sgf’

Ruby SgfParser now really working!

Thursday, December 31st, 2009

Thanks @alfmikula, it saves properly and has even been gemified. I will soon push it to gemcutter and maybe put a homesite on Rubyforge, not sure.
It can be found at http://github.com/Trevoke/SGFParser for now, get the code while it’s hot! :-)

SGF Parser updated

Monday, October 12th, 2009

Someday I’ll come out with a proper revision numbering scheme for it.
I’ve implemented some Cucumber testing, the code now actually parses SGF files properly, including the KGS ones, it’ll work on Ruby 1.8.6, 1.8.7, 1.9.1, so .. It’s all good on that front.

The code’s not as clean as I’d like it to be, and probably not as commented, either.

http://github.com/Trevoke/SGFParser

I am not -saving- SGF files with it yet, but heck if I’m not parsing them. And now YOU can, too !

Ruby SGF Parser

Tuesday, September 15th, 2009

So, I play weiqi (known as the game of go, but I prefer using the chinese name).
There are some SGF parsers out there for Ruby, but I wanted to write my own – the other ones didn’t seem comprehensive enough, didn’t seem Ruby-like enough in their objectifiying the women data.
My original goal was twofold: write a script to rename all the SGF files in my collection so they can be easily parsed later, and … Learn more Ruby!
Here is the github link: http://github.com/Trevoke/SGFParser
It’s a work in progress. Right now it parses the SGF file properly, but the user has a fair amount of work to do to use the data.. Which, maybe, is the way it needs to be. But I’m gonna try to follow the principle of least surprise to the bitter end! :)