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

system.verbs.builtins.mainResponder.testing.convertDiscussionGroup

<<11/11/98; 4:25:20 AM by DW
	<<convert all the messages in discussiongroup.root into tickets

local (f = mainresponder.tickets.openfile ());
local (adrprefs = @[f].["#data"].prefs);

local (adrsource = @["d:\\Nirvana Server\\www\\discussionGroup.root"].["#messages"]);
local (i, ticket);
window.about ();
for i = 1 to sizeof (adrsource^) {
	adrmsg = @adrsource^ [i];
	new (tabletype, @ticket);
	ticket.title = nameof (adrmsg^);
	ticket.postTime = adrmsg^.posttime;
	ticket.notifyList = {"discussionGroup"};
	ticket.ticketNum = adrprefs^.nextTicketNumber++;
	<<these fields are specific to dg msgs
	ticket.subject = adrmsg^.subject;
	ticket.member = adrmsg^.author;
	ticket.ctReads = adrmsg^.readCount;
	try {ticket.inReplyTo = adrmsg^.inReplyTo} else {ticket.inReplyTo = 0};
	try {ticket.responses = adrmsg^.responses} else {ticket.responses = {}};
	ticket.body = string (adrmsg^.text);
	msg (adrmsg);
	mainresponder.tickets.addticket (@ticket)}



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.