Tuesday, August 18, 2009 at 7:53 PM.
howtoSuite.getDocumentOutline
on getDocumentOutline () { <<Changes <<8/12/08; 2:21:09 PM by DW <<Outlines the user's howto document tree. Double-click on any of the files to open it. local (adroutline = @user.howto.docsOutline, doctable); new (outlinetype, adroutline); local (oldtarget = target.set (adroutline)); op.setlinetext (clock.now ()); edit (adroutline); howtoSuite.getDocumentList (@doctable); for adr in @doctable { local (path = nameof (adr^), i, name, ctfields = string.countfields (path, "/")); op.firstsummit (); for i = 1 to ctfields { name = string.nthfield (path, "/", i); op.expand (1); if not op.go (right, 1) { op.insert (name, right)} else { loop { if op.getlinetext () == name { break}; if not op.go (down, 1) { op.insert (name, down)}}}; if i == ctfields { local (atts); new (tabletype, @atts); atts.type = "howToDocument"; atts.path = path; op.attributes.addgroup (@atts)}}}; op.firstsummit (); window.zoom (adroutline); target.set (oldtarget)}; bundle { //test code getDocumentOutline ()}
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.