Mercurial > hg > index.fcgi > www > www-1
changeset 9:fbd8c30c465c
add more RSS feeds; normalize-space in step2.xsl and "a hrefs"; myrss_update.sh now outputs a more complete HTML document to stdout
author | paulo@twcdns.fastsearch.net |
---|---|
date | Sun, 12 Sep 2010 23:36:32 -0700 |
parents | 8afd18e103c7 |
children | 23235139f34d |
files | myrss/FEEDS myrss/index.css myrss/myrss_update.sh myrss/step2.xsl |
diffstat | 4 files changed, 42 insertions(+), 6 deletions(-) [+] |
line diff
1.1 --- a/myrss/FEEDS Sat Sep 11 04:20:41 2010 -0700 1.2 +++ b/myrss/FEEDS Sun Sep 12 23:36:32 2010 -0700 1.3 @@ -5,7 +5,10 @@ 1.4 http://feeds.sfgate.com/sfgate/rss/feeds/warriors 1.5 http://feeds.sfgate.com/sfgate/rss/feeds/blogs/sfgate/warriors/index_rss2 1.6 http://www.reddit.com/.rss 1.7 +http://services.digg.com/2.0/story.getTopNews?type=rss 1.8 +http://feeds.delicious.com/v2/rss/?count=15 1.9 http://feeds.feedburner.com/Metafilter 1.10 +http://feeds.slate.com/slate 1.11 http://bikesnobnyc.blogspot.com/feeds/posts/default 1.12 http://feeds.feedburner.com/bikehugger 1.13 http://www.xkcd.com/rss.xml
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/myrss/index.css Sun Sep 12 23:36:32 2010 -0700 2.3 @@ -0,0 +1,21 @@ 2.4 +@import "../index.css"; 2.5 + 2.6 +h1 2.7 +{ 2.8 + font-family: "sans-serif"; 2.9 +} 2.10 + 2.11 +h2 2.12 +{ 2.13 + font-family: "sans-serif"; 2.14 +} 2.15 + 2.16 +a:link 2.17 +{ 2.18 + text-decoration: none; 2.19 +} 2.20 + 2.21 +p:first-line 2.22 +{ 2.23 + font-weight: bold; 2.24 +}
3.1 --- a/myrss/myrss_update.sh Sat Sep 11 04:20:41 2010 -0700 3.2 +++ b/myrss/myrss_update.sh Sun Sep 12 23:36:32 2010 -0700 3.3 @@ -1,10 +1,20 @@ 3.4 #!/bin/sh 3.5 3.6 -OUTFILE="test.html" 3.7 +TIMESTAMP=$(date '+%FT%T%:z') 3.8 3.9 -echo '' > ${OUTFILE} 3.10 +echo '<HTML>' 3.11 +echo '<HEAD>' 3.12 +echo "<TITLE>${TIMESTAMP}</TITLE>" 3.13 +echo '<LINK REL="stylesheet" TYPE="text/css" HREF="index.css">' 3.14 +echo '</HEAD>' 3.15 + 3.16 +echo '<BODY>' 3.17 +echo "<H1>${TIMESTAMP}</H1>" 3.18 3.19 while read LINE 3.20 do 3.21 - wget -q -U '' -O - ${LINE} | xsltproc step1.xsl - | xsltproc step2.xsl - >> ${OUTFILE} 3.22 + wget -q -U '' -O - ${LINE} | xsltproc step1.xsl - | xsltproc step2.xsl - 3.23 done < FEEDS 3.24 + 3.25 +echo '</BODY>' 3.26 +echo '</HTML>'
4.1 --- a/myrss/step2.xsl Sat Sep 11 04:20:41 2010 -0700 4.2 +++ b/myrss/step2.xsl Sun Sep 12 23:36:32 2010 -0700 4.3 @@ -1,12 +1,14 @@ 4.4 <?xml version="1.0" encoding="ISO-8859-1"?> 4.5 -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:pba="http://www.pauloang.com/"> 4.6 +<xsl:stylesheet version="1.0" 4.7 + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 4.8 + xmlns:pba="http://www.pauloang.com/"> 4.9 <xsl:output method="html"/> 4.10 4.11 <xsl:template match="pba:site"> 4.12 -<H2><A HREF="{pba:link}"><xsl:value-of select="pba:title"/></A></H2> 4.13 +<H2><A HREF="{normalize-space(pba:link)}"><xsl:value-of select="pba:title"/></A></H2> 4.14 <P> 4.15 <xsl:for-each select="pba:headline"> 4.16 - <A HREF="{pba:link}"><xsl:value-of select="pba:title"/></A> - 4.17 + <A HREF="{normalize-space(pba:link)}"><xsl:value-of select="pba:title"/></A> - 4.18 </xsl:for-each> 4.19 </P> 4.20 </xsl:template>