Having fallen quickly into a deep addiction to Everything2, I soon realized that my life could not be complete until I was able to get the New Writeups Nodelet into my RSS reader. I was soon directed to the New Writeups XML Ticker which provided me a machine-readable account of what I was after. Alas, NetNewsWire wasn't interested in digesting that (nor did I expect it to be), and so I decided it was up to me to write something that would eat E2link-formatted XML and poop out RSS for my compulsive newsreading pleasure.

My own personal copy of this (for you to try, if you so desire) is at:


BUT, if you find this useful enough, and have access to a ColdFusion 6.1 or better web application server, than you can copy the code below and have your very own copy to play with and make changes to to your heart's content.

NOTE: for readability's sake, I have added some extraneous line breaks into the code below. If you use this on your server, feel free to make the code pretty again, or contact me and I'll get you a better copy.

Everything2 New Writeups XML ticker to RSS format converter   Version 1.0  May 26, 2004
Written by Sigil (Andy Waschick) @ Gestalt, Inc.  http://www.gestalt.cx   

This file sits on a conveniently-located ColdFusion 6.1 (or equivalent function) web application server 
and, when a request is made to it, will call the E2 New Writeups XML ticker and convert it on-the-fly 
to an RSS feed, suitable for display in your favorite news reader. 
NOTE:  This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License. 
To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/2.0/ or 
send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

<!--- Translator default settings - these are set as Custom Tag defaults in case you want to take this 
file and integrate its into something else.  --->

<cfparam name="attributes.e2url" default="http://www.everything2.com/index.pl?node_id=1291781"> 
<!--- the URL of the XML ticker --->
<cfparam name="attributes.e2timeout" default="120"> 
<!--- the number of seconds you're willing to wait for your fix --->
<cfparam name="attributes.servertimezone" default="CST"> 
<!--- the time zone of this server --->

<cfparam name="attributes.appname" default="E2RSS"> 
<!--- the name of the CF app we're using on your server 
to track what's old and what's new --->
<cfparam name="attributes.targetarray" default="newwriteups"> 
<!--- the name of the XML structure which 
contains the "wu" array we're after --->

<cfparam name="attributes.rss_headline" default="Everything2 New Writeups"> 
<!--- the title of the RSS Feed --->
<cfparam name="attributes.rss_link" default="#cgi.server_name##cgi.script_name#"> 
<!--- the link to this feed.  Generally the automatic self-referencing link will do fine, 
unless you want to get all fancy --->
<cfparam name="attributes.rss_description" default="Like you were wasting enough time on E2.  
Here's the latest new writeups!  Say, if you like this and have a ColdFusion 6.1 + server, you should 
set up your own copy so you won't have to use up all my server bandwidth.  Enjoy!"> 
<!--- the description of the RSS feed --->


<!--- initialize the web application --->
<cfapplication name="#attributes.appname#" sessionmanagement='no' clientmanagement='no'>

<!--- initialize the ID cache variable and/or pull its existing value out of the application variable --->
<cfset variables.newidcache = structNew()> <!--- the ID cache we'll be writing back to the application --->
<cflock scope="application" type="readonly" timeout="30">
	<cfif isdefined("application.idcache") is "yes">
		<cfset variables.idcache = application.idcache>
		<cfset variables.idcache = structNew()>

<!--- go talk to the E2 site --->
<cfhttp url = "#attributes.e2url#" timeout = "#attributes.e2timeout#">

<!--- make sure there's a value for the returned response --->
<cfparam name="cfhttp.filecontent" default=""> 

<!--- get the response data and turn it into an struct we can talk to --->
<cfset variables.e2response = xmlparse(cfhttp.filecontent)>

<!--- get the target array out of the XML response --->
<cfset variables.wuarray = variables.e2response[attributes.targetarray]>

<!--- RSS Feed Output --->

<!--- HEADER --->
<cfcontent type="text/xml" reset="yes"><?xml version="1.0" ?> 
<!-- RSS generated by Sigil's E2 to RSS translator at #attributes.rss_link# on 
#dateformat(now(),'ddd, dd mmm yyyy')# #timeformat(now(),'HH:mm:ss')# local server time -->
<rss version="2.0">
	<lastBuildDate>#dateformat(now(),'ddd, dd mmm yyyy')# #timeformat(now(),'HH:mm:ss')# 

<!--- BODY --->
<cfloop from="1" to="#arraylen(variables.wuarray.wu)#" index="itemindex">
<!--- loop over the entries in the writeup array --->
<cfset thisitem = variables.wuarray.wu[itemindex]> 
<!--- get this writeup info into a variable that's less of a mouthful --->	

<!--- determine the time/date stamp we should apply to this node --->
<cfif structkeyexists(variables.idcache,thisitem.e2link.xmlattributes.node_id)>
	<cfset variables.date = variables.idcache[thisitem.e2link.xmlattributes.node_id]> 
	<!--- this node has been translated by t
	his app before, use that datetime --->
	<cfset variables.date = now()> 
	<!--- this is a node this app doesn't know about.  Set a new date value. --->

<!--- copy this node ID into the new ID cache variable so it will be remembered for later.  
This is so old nodes no longer needed in the ID cache will be cleared out --->
<cfset variables.newidcache[thisitem.e2link.xmlattributes.node_id] = variables.date>

<a href="http://www.everything2.com/index.pl?node_id=#thisitem.e2link.xmlattributes.node_id#">
<a href="http://www.everything2.com/index.pl?node_id=#thisitem.author.e2link.xmlattributes.node_id#">
<pubDate>#dateformat(variables.date,'ddd, dd mmm yyyy')# #timeformat(variables.date,'HH:mm:ss')# 


<!--- FOOTER --->

<!--- remember the ID cache for later --->
<cflock scope="application" type="exclusive" timeout="30">
	<cfset application.idcache = variables.newidcache>