Woops

Filed under: Uncategorized — 2005-09-08 @ 04:58:30

Being on the 5pm to 1am shift definitely screws some things up. I have always been able to physically shift very easily from waking up at 6am one day and needing to wake up at 6pm the next. Dramatic shifts like that do take a toll on me but I can do it pretty easily. As you might assume I have never suffered from jet lag. I would probably do well in an enviroment like Alaska where you have 24 hours of daylight or 24 hours of night (I would prefer this honestly). When you do have shifts like this however you tend to forget things that were a part of your regular routine. Like blogging.
Also, what's going on new orleans has made me just sick. Most of what I have been hearing about has been far to depressing to read about let alone write about.
I put up my OPML file for anyone to see. For the moment I can't make it actually update in a live way because NetNewsWire does not seem to save an OPML anywhere. Perhaps someone at Ranchero can either tell me how to find a OPML of my subscriptions that gets updated automagically or can add such a feature. ;-)
The code I used to do it is trivial.

<?
	$xh = xslt_create(); 
	$opml="/home/adamhost/blog.adamjacobmuller.com/opml/MySubscriptions.opml";
	$xslt="/home/adamhost/blog.adamjacobmuller.com/opml/opml2html.xslt";
	if ($result = xslt_process($xh,$opml,$xslt)) {
		print $result; 
	} else { 
		print"unable to transform $opml using $xslt because " . xslt_error($xh) . "\n";
	} 
	xslt_free($xh); 
?>

The XSLT looks like this
<?xml version="1.0"?>
<html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" lang="en">
	<table>
	<xsl:for-each select="opml/body//outline">
		<tr>
		<xsl:choose>
		<xsl:when test="@type">
			<td style="padding-left:30px;">
			<a href="{@htmlUrl}"><xsl:value-of select="@title"/>
			</a>
			</td>
			<td>
			<a title="{@description}" href="{@xmlUrl}"><img src="/wp-content/themes/dark_maple/images/buttons/xml.png" alt="XML" border="0"/></a>
			</td>
		</xsl:when>
		<xsl:otherwise>
			<td colspan="3">
			<a name="{@title}" />
			<h3><xsl:value-of select="@title"/></h3>
			</td>
		</xsl:otherwise>
		</xsl:choose>
		</tr>
	</xsl:for-each>
	</table>
</html>

works pretty nicely, now if i could just automate it with netnewswire

1 Comment »

  1. Brent Simmons:

    NetNewsWire doesn’t automagically keep an updated OPML file for you — however, it is scriptable via AppleScript, and you can tell it to write an OPML file.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

(required)

(required)