D
Dave
I was about to create an input to this script:
http://www.destroydrop.com/javascripts/tree/
basically its an tree structute that can be created, so i thought i
would give it a try. If you look at the code you need to generate it
similar to this:
d.add(0,-1,'My example tree');
d.add(1,0,'Node 1','example01.html');
d.add(2,1,'Node 2','example01.html');
d.add(3,1,'Node 1.1','example01.html');
d.add(4,1,'Node 3','example01.html');
d.add(5,1,'Node 1.1.1','example01.html');
d.add(6,1,'Node 1.1.1.1','example01.html');
d.add(7,1,'Node 4','example01.html');
d.add(8,1,'Node 1.2','example01.html');
d.add(9,0,'My Pictures','example01.html','Pictures I\'ve taken over the
years','','','img/imgfolder.gif');
d.add(10,9,'The trip to Iceland','example01.html','Pictures of Gullfoss
and Geysir');
d.add(11,9,'Mom\'s birthday','example01.html');
d.add(12,9,'Recycle Bin','example01.html','','','img/trash.gif')
etc
what i need to do is to create the tree structure with perl i.e:
1,0
2,1
3,1
4,1
5,0
6,5
7,5
8,5
9,5
10,0
11,10
etc..
i know that at every 5th interation i need to put in a zero to make a
new "tree" and after that we need to add children to that tree. ideas?
http://www.destroydrop.com/javascripts/tree/
basically its an tree structute that can be created, so i thought i
would give it a try. If you look at the code you need to generate it
similar to this:
d.add(0,-1,'My example tree');
d.add(1,0,'Node 1','example01.html');
d.add(2,1,'Node 2','example01.html');
d.add(3,1,'Node 1.1','example01.html');
d.add(4,1,'Node 3','example01.html');
d.add(5,1,'Node 1.1.1','example01.html');
d.add(6,1,'Node 1.1.1.1','example01.html');
d.add(7,1,'Node 4','example01.html');
d.add(8,1,'Node 1.2','example01.html');
d.add(9,0,'My Pictures','example01.html','Pictures I\'ve taken over the
years','','','img/imgfolder.gif');
d.add(10,9,'The trip to Iceland','example01.html','Pictures of Gullfoss
and Geysir');
d.add(11,9,'Mom\'s birthday','example01.html');
d.add(12,9,'Recycle Bin','example01.html','','','img/trash.gif')
etc
what i need to do is to create the tree structure with perl i.e:
1,0
2,1
3,1
4,1
5,0
6,5
7,5
8,5
9,5
10,0
11,10
etc..
i know that at every 5th interation i need to put in a zero to make a
new "tree" and after that we need to add children to that tree. ideas?