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

system.verbs.apps.wordPress.getSiteData

on getSiteData (siteUrl) {
	<<Changes
		<<10/28/09; 9:11:35 AM by DW
			<<Created. 
	local (adrdata = wordPress.init (), adrsite = @adrdata^.sites.[siteUrl], now = clock.now ());
	if not defined (adrsite^) {
		if not metaweblog.getRsdData (siteUrl, adrsite) {
			scriptError ("Can't get site data because " + siteUrl + " isn't a WordPress site.")};
		new (tabletype, @adrsite^.stats);
		adrsite^.stats.ctAccesses = 0;
		adrsite^.stats.whenFirstAccess = now};
	adrsite^.stats.ctAccesses++;
	adrsite^.stats.whenLastAccess = now;
	return (adrsite)};
bundle { //test code
	edit (getSiteData ("http://rebootnews.wordpress.com/"))}



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.