<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Seven steps &#187; listbrowser</title>
	<atom:link href="http://trevoke.net/blog/tag/listbrowser/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevoke.net/blog</link>
	<description>Martial arts and technology, $DEITY what a mix!</description>
	<lastBuildDate>Tue, 11 May 2010 20:52:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>New gem: ListBrowser</title>
		<link>http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/</link>
		<comments>http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 00:01:19 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[listbrowser]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=209</guid>
		<description><![CDATA[~~~~ ListBrowser README ~~~~ I was working on a parser for a very specific tree structure, and was frustrated that there wasn’t a simple way to parse it in irb. &#8220;What??&#8221;, I thought. &#8220;I have to use my brain?! God forbid!&#8221;. So I set to using my brain a little more to create this tool. [...]]]></description>
			<content:encoded><![CDATA[<p>~~~~ ListBrowser README ~~~~</p>
<p>I was working on a parser for a very specific tree structure, and was frustrated that there wasn’t a simple way to parse it in irb. &#8220;What??&#8221;, I thought. &#8220;I have to use my brain?! God forbid!&#8221;. So I set to using my brain a little more to create this tool. It’s not much, but maybe it’ll make someone’s life a little easier.</p>
<p>Install: (set up gemcutter)<br />
gem install ListBrowser</p>
<p>It can be used in irb, and really should be used there &#8211; when you call it on a tree structure, you’ll get a menu with a list of choices on how you want to go through whatever structure you gave it.</p>
<p>In my particular, special case, I would do something like this:</p>
<p>require ‘sgf_parser’ # For my tree structure require ‘list_browser’ # For this.</p>
<p>tree = SgfParser::Tree.new :filename => &#8220;kogo.sgf&#8221;</p>
<p>ListBrowser.new tree.root, ‘parent’, ‘children’, ‘properties’</p>
<p># And follow the menu!</p>
<p> In my particular case, I would not need to enter those strings, as they<br />
 just happen to be the names I chose for my tree structure, but they should<br />
 serve as a good enough example!</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Send to:</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/&amp;title=New+gem%3A+ListBrowser" title="Add 'New gem: ListBrowser' to digg"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'New gem: ListBrowser' to digg" alt="Add 'New gem: ListBrowser' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/&amp;title=New+gem%3A+ListBrowser" title="Add 'New gem: ListBrowser' to reddit"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'New gem: ListBrowser' to reddit" alt="Add 'New gem: ListBrowser' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/" title="Add 'New gem: ListBrowser' to Technorati"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/technorati.png" title="Add 'New gem: ListBrowser' to Technorati" alt="Add 'New gem: ListBrowser' to Technorati" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.newsvine.com/_wine/save?u=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/&amp;h=New+gem%3A+ListBrowser" title="Add 'New gem: ListBrowser' to Newsvine"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/newsvine.png" title="Add 'New gem: ListBrowser' to Newsvine" alt="Add 'New gem: ListBrowser' to Newsvine" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/&amp;title=New+gem%3A+ListBrowser" title="Add 'New gem: ListBrowser' to Stumble Upon"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'New gem: ListBrowser' to Stumble Upon" alt="Add 'New gem: ListBrowser' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://slashdot.org/bookmark.pl?title=New+gem%3A+ListBrowser&amp;url=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/" title="Add 'New gem: ListBrowser' to SlashDot"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/slashdot.png" title="Add 'New gem: ListBrowser' to SlashDot" alt="Add 'New gem: ListBrowser' to SlashDot" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/&amp;t=New+gem%3A+ListBrowser" title="Add 'New gem: ListBrowser' to FaceBook"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'New gem: ListBrowser' to FaceBook" alt="Add 'New gem: ListBrowser' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=New+gem%3A+ListBrowser&amp;c=http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/" title="Add 'New gem: ListBrowser' to MySpace"><img src="http://trevoke.net/blog/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'New gem: ListBrowser' to MySpace" alt="Add 'New gem: ListBrowser' to MySpace" /></a></div>
<!-- Social Bookmarking Reloaded END -->]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
