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


	<<4/29/07; 9:00:06 AM by DW
		<<If there's no link, don't make it a link node.
local (dir = right, i, s, url, lenurl, atts);
new (tabletype, @atts);
atts.type = "link";
twitter.getusertimeline (op.getlinetext (), @timeline);
op.deletesubs ();
for i = sizeof (timeline) downto 1 {
	adritem = @timeline [i];
	s = adritem^.text;
	url = "";
	ix = string.patternmatch ("http://", string.lower (s));
	if ix > 0 {
		lenurl = sizeof (s) - ix + 1;
		url = string.mid (s, ix, lenurl);
		s = string.delete (s, ix, lenurl);
		if sizeof (s) == 0 { //url must have been at beginning
			s = adritem^.text}};
	s = string.trimwhitespace (s);
	op.insert (s, dir); dir = down;
	if sizeof (url) > 0 { //4/29/07 by DW
		atts.url = url;
		op.attributes.addgroup (@atts)}};
	<<msg (adritem^.text)
op.go (left, 1);
msg ("");
return (true)

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.