Monday, November 08, 2010 at 12:03 AM.

system.verbs.builtins.html.utilities.findAllHREFs

on findAllHREFs (adrtable, adroutline) {
	on visit (adrobject) {
		local (type = typeof (adrobject^));
		if (type != tableType) and (type != stringtype) {
			local (s = string (adrobject^));
			if string.lower (s) contains "<a href" {
				op.insert (adrobject, down);
				local (dir = right);
				loop {
					local (ct, ix = string.patternmatch ("<a href", string.lower (s)));
					if ix == 0 {
						if dir == down {
							op.go (left, 1)};
						break};
					s = string.delete (s, 1, ix - 1);
					ct = string.patternmatch ("</a>", string.lower (s)) + 3;
					href = string.mid (s, 1, ct);
					s = string.delete (s, 1, ct);
					op.insert (href, dir);
					dir = down}}}};
	new (outlinetype, adroutline);
	edit (adroutline);
	target.set (adroutline);
	table.visit (adrtable, @visit);
	editmenu.setfont ("geneva");
	editmenu.setfontsize (9);
	op.firstsummit ();
	op.deleteline ();
	window.zoom (adroutline)};
findAllHREFs (@user.websites.frontier, @scratchpad.urllist)



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.