README.rdoc in SgfParser-1.0.0 vs README.rdoc in SgfParser-2.0.0

- old
+ new

@@ -1,44 +1,18 @@ =INFORMATION -Author: Aldric Giacomoni +Author: Aldric Giacomoni || Email : trevoke@gmail.com -Email : aldric@at@trevoke.net (feedback very welcome!) +Build status {<img src="https://secure.travis-ci.org/Trevoke/SGFParser.png" />}[http://travis-ci.org/Trevoke/SGFParser] -SGF: all formats (but untested with FF < 4) +Are you using this gem? Is there functionality you wish it had? Is something hard to do? -Ruby: >=1.8.7 (may work with 1.8.6) +Let me know and I'll make it possible, or easier! -=QUICK HOWTO -Example: - require 'sgf' - tree = SGF::Parser.new file_or_string +SGF: FF4 - may support earlier ones as well, but untested. +Ruby: >=1.8.7 (may work with 1.8.6) -All trees begin with an empty node ( @root) which allows a simple support of multiple gametrees. +WARNING: An implementation requirement is to make sure any closing bracket ']' inside a comment is escaped: '\\]'. If this is not done, you will be one sad panda! This library will do this for you upon saving, but will most likely die horribly when parsing anything which does not follow this rule. -Most games will just care about, say, - tree.root.children[0] which is the first node of the first gametree. +I'm honestly hoping that this is and remains the fastest SGF parser in Ruby. On my desktop, loading the SGF library and parsing Kogo's Joseki dictionary takes a little under six seconds. -For any node, one can summon the properties as such: - node.properties # => returns a hash of the properties. -A single property can be called, like the comments, for instance, like so: - node.C # => returns the comments for this node. - node.comments # => syntactic sugar - -The library currently uses method_missing to painlessly return the data. I must admit that this is both clever coding and laziness on my part. - -There is also a SGF Indenter. Its purpose is to make SGF files more readable to humans at a glance. - require 'sgf/sgfindent' # Done automatically if you require 'sgf_parser' - sgf = SGF::Indenter.new 'some_ugly_file.sgf' # Will output to the console - sgf = SGF::Indenter.new 'some_ugly_file.sgf' 'pretty.sgf' # Sends the result to a new file. - -___ - -TODO -- Create a "Game" class that wraps a complete set of () for ease of use -- implement node.next to go to node.children[0] because who wants to type that anyway? -- implement a 'current' node in Tree so we don't have to jump from node to node. This means.. - - implement tree.next instead of node.next for tree.current_node.children[0] -- examine/fix the smell that when you use add_children, it also sets the parent on the passed-in nodes. -- fix the multiple properties bug in the SGF indenter as well -- see how much of the parser code the indenter can use, since it's basically the same logic - +Documentation available at the Github wiki: https://github.com/Trevoke/SGFParser/wiki \ No newline at end of file