Saturday, November 27, 2010 at 5:01 AM.

workspace.userlandSamples.getListHtml

<<Changes
	<<11/27/10; 3:39:52 AM by DW
		<<Take an outline with a list of domain names, put the cursor on one of the names, and run this script. It will create a list in the web browser of links you can click on to verify that the sites are accessible.
			<<http://scripting.com/images/2010/11/27/list.gif
local (htmltext = "", indentlevel = 0, domain);
on add (s) {
	htmltext = htmltext + string.filledstring ("\t", indentlevel) + s + "\r"};
op.go (up, infinity);
add ("<ol>"); indentlevel++;
loop {
	domain = op.getlinetext ();
	add ("<li><a href=\"http://" + domain + "/\">" + domain + "</a></li><br>");
	if not op.go (down, 1) {
		op.go (up, infinity);
		break}};
add ("</ol>"); indentlevel--;
webbrowser.displaytext (htmltext)



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.