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


<<crawl the server structure, add each root file to config.mainresponder.databases
	<<I needed this to get started really using config.mainresponder.databases
	<<10/21/98; 8:10:58 AM by DW

on createRecord (f) {
	local (name = file.filefrompath (f));
	local (adrtable = @config.mainresponder.databases.[name]);
	new (tabletype, adrtable);
	adrtable^.f = f;
	adrtable^.backupEveryNight = true;
	adrtable^.openOnStartup = false;
	adrtable^.supportsSearch = true;
	adrtable^.supportsSubscribe = false};

on callback (adr) {
	if typeof (adr^) == tabletype {
		local (s = string (adr));
		if (s beginswith "[") and (s endswith "]") {
			local (alist = string.parseaddress (adr));
			if sizeof (alist) == 1 {
				createRecord (alist [1])}}};
	return (true)};

window.about ();
mainresponder.crawler (, @callback)

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.