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


on setupNewUser (username, opmlurl) {
		<<9/18/2010; 6:26:30 PM by DW
			<<Example code that shows how to start a new user in River2.
	local (opmltext = tcp.httpreadurl (opmlurl), feeds, adr);
	local (adruser = @config.river2.users.[username]);
	river2suite.inituser (adruser);
	xml.rss.getOpmlFeeds (opmltext, @feeds);
	<<scratchpad.feeds = feeds
	for adr in @feeds {
		local (url = nameof (adr^));
		scratchpad.url = url;
		try {river2suite.subscribefeed (url)};
		new (tabletype, @adruser^.feeds.[url])};
	river2suite.inituser (username)};
bundle { //test code
	setupNewUser ("eastVillage", "")}

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.