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

system.verbs.builtins.radio.theme.exportThemeFile

on exportThemeFile (f, adrTheme) {
	<<Changes
		<<12/30/01; 9:13:33 PM by JES
			<<Exports the Theme table at adrTheme, to the file specified by f.
			<<Cribbed from manilaSuite.themes.downloadPage.
	
	local (filetext = "");
	
	on add (s) {
		filetext = filetext + s};
	add ("\r<!--\r#fatPage\r");
	on addHint (name, value, flencode=false) {
		local (s = string (value));
		if flencode {
			s = base64.encode (string (s), 0)};
		add ("#" + name + " " + s + "\r")};
	
	local (themeName = file.fileFromPath (f));
	themeName = string.popSuffix (themeName);
	
	addHint ("version", 1);
	addHint ("docs", "http://www.scripting.com/fatPages/faq.html");
	addHint ("adrObject", "config.manila.themes.[\"" + themeName + "\"]");
	addHint ("netAddress", html.getPref ("serverNetAddress"));
	addHint ("objectCreated", date.netStandardString (clock.now ()));
	addHint ("objectModified", date.netStandardString (clock.now ()));
	addHint ("lastBuildTime", date.netStandardString (clock.now ()));
	addHint ("adrPageData", "temp.radio.misc.[\"" + themeName + "Theme\"]");
	addHint ("objectType", "application/x-frontier-tabl");
	addHint ("pageData", fatPages.encodePageData (adrTheme), true);
	add ("-->\r");
	
	file.writeWholeFile (f, filetext, 'fttb', Frontier.id)}



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.