0.0
Low commit activity in last 3 years
No release in over a year
Generates an HTML tree from XML or Markdown.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.2, >= 0.2.2
~> 2.3, >= 2.3.1
~> 1.12, >= 1.12.5
~> 1.3, >= 1.3.4
 Project Readme

Building an HTML tree using the JsTreeBuilder gem

Usage

require 'jstreebuilder'


tree = "
<tree>
  <item title='breakfast'>
    <item title='Corn Flakes'/>
    <item title='coffee'/>
  </item>
  <item title='lunch'>
    <item title='soup'>
      <item title='tomato'/>
      <item title='oxtail'/>
    </item>
    <item title='apple'/>
  </item>
  <item title='mealtime'>
    <item title='melon' url='http://a0.jamesrobertson.me.uk'/>
    <item title='cheese burger'/>
    <item title='milk shake'/>
  </item>
  

</tree>
"

## or

tree ="
<?polyrex schema='entries[title]/link[title,url]' delimiter=' # '?>
title: Links to Foo

foo bar # http://someexamplewebsite.com/do/fun/rrr
  foo2 # http://someexamplewebsite.com/do/fun2/rrr
  foo3 # http://someexamplewebsite.com/do/fun3/rrr
doo # http://someexamplewebsite.com/do/dun/eee
"

#jtb = JsTreeBuilder.new :tree, {src: tree, debug: true}
jtb = JsTreeBuilder.new({src: tree, debug: true})
File.write '/tmp/tree4.html',  jtb.to_webpage
`firefox /tmp/tree4.html`

Output

Screenshot as observed from the browser window:

jstreebuilder tree