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


on create (longUrl) {
		<<4/2/09; 2:27:27 PM by DW
	local (apiurl = "" + string.urlencode (longurl));
	digg.init ();
	local (xmltext = tcp.httpreadurl (apiurl), xstruct);
	xml.compile (xmltext, @xstruct);
	<<scratchpad.xstruct = xstruct
	local (adrshorturls = xml.getaddress (@xstruct, "shorturls"));
	local (adrshorturl = xml.getaddress (adrshorturls, "shorturl"));
	config.digg.stats.whenLastShortUrlCreate = ();
	return (adrshorturl^.["/atts"].short_url)};
bundle { //test code
	webbrowser.openurl (create (""))}

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.