Tuesday, August 18, 2009 at 7:30 PM.

myTwitterProfileSuite.newPodcast

on newPodcast (feedname, url, adradrpodcast=nil) {
	<<Changes
		<<5/26/09; 10:47:49 AM by DW
			<<Created. 
	local (adrdata = myTwitterProfileSuite.init (), adrcal = @adrdata^.calendar, now = clock.now ());
	local (adrday = mainresponder.calendar.getdayaddress (adrcal, now));
	local (adrpodcast = @adrday^.[string.padwithzeros (adrdata^.prefs.calendarSerialnum++, 5)]);
	new (tabletype, adrpodcast);
	adrpodcast^.type = "podcast";
	adrpodcast^.enclosureUrl = url;
	adrpodcast^.feed = feedname;
	adrpodcast^.pubDate = now;
	local (adroutline = @adrpodcast^.outline, atts);
	new (outlinetype, adroutline);
	new (tabletype, @atts);
	local (oldtarget = target.set (adroutline));
	op.setlinetext ("Title of podcast goes here.");
	op.insert ("Describe the podcast here", right);
	atts.type = "link";
	atts.url = url;
	op.attributes.addgroup (@atts);
	op.go (left, 1);
	target.set (oldtarget);
	if adradrpodcast != nil {
		adradrpodcast^ = adrpodcast}};
bundle { //test code
	local (adrpodcast);
	<<newPodcast ("badHair", "http://mp3.morningcoffeenotes.com/badHair09Aug13.mp3", @adrpodcast)
	newPodcast ("rebootNews", "http://mp3.morningcoffeenotes.com/reboot09Aug17.mp3", @adrpodcast);
	edit (adrpodcast)}



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.