swerc

anselm's simpler werc fork
git clone git://git.suckless.org/swerc
Log | Files | Refs | README

commit b25f9c917b63fae7e1189db95ed5e5baeccabafa
parent c58fbdfc2d1c52379b667d312433ab768c6b4021
Author: uriel@suckless.org <unknown>
Date:   Fri, 27 Jun 2008 03:16:07 +0200

Move rss template into its own file
Diffstat:
Mbin/controller.rc | 31+------------------------------
Apub/feeds/rss20.tpl | 27+++++++++++++++++++++++++++
2 files changed, 28 insertions(+), 30 deletions(-)

diff --git a/bin/controller.rc b/bin/controller.rc @@ -231,33 +231,4 @@ fn statpost { } } -# Should be in a separate file. -cat <<'!' | template -Content-Type: text/xml; charset=utf-8 - -<?xml version="1.0" encoding="UTF-8"?> -<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> - <channel> - <atom:link href="%('http://'$site^$REQUEST_URI%)" rel="self" type="application/rss+xml" /> - <title>%($siteTitle%)</title> - <link>%($uri%)</link> - <description>%($blogDesc%)</description> - <language>en-us</language> - <generator>Tom Duff's rc, and Kris Maglione's clever hackery</generator> - <webMaster>uriel99+rss@gmail.com (Uriel)</webMaster> -%{ - for(f in `{sortedBlogPostList $blogDirs}) { - statpost $f -%} <item> - <title>%($title%)</title> - <author>%($by%)@noreply.cat-v.org (%($by%))</author> - <link>%($uri%)</link> - <guid isPermaLink="true">%($uri%)</guid> - <pubDate>%($date%)</pubDate> - <lastBuildDate>%($mdate%)</lastBuildDate> - <description><![CDATA[<pre>%($summary%)</pre>]]></description> - </item> -% } - </channel> -</rss> -! +cat pub/feeds/rss20.tpl | template diff --git a/pub/feeds/rss20.tpl b/pub/feeds/rss20.tpl @@ -0,0 +1,27 @@ +Content-Type: text/xml; charset=utf-8 + +<?xml version="1.0" encoding="UTF-8"?> +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <atom:link href="%('http://'$site^$REQUEST_URI%)" rel="self" type="application/rss+xml" /> + <title>%($siteTitle%)</title> + <link>%($uri%)</link> + <description>%($blogDesc%)</description> + <language>en-us</language> + <generator>Tom Duff's rc, and Kris Maglione's clever hackery</generator> + <webMaster>uriel99+rss@gmail.com (Uriel)</webMaster> +%{ + for(f in `{sortedBlogPostList $blogDirs}) { + statpost $f +%} <item> + <title>%($title%)</title> + <author>%($by%)@noreply.cat-v.org (%($by%))</author> + <link>%($uri%)</link> + <guid isPermaLink="true">%($uri%)</guid> + <pubDate>%($date%)</pubDate> + <lastBuildDate>%($mdate%)</lastBuildDate> + <description><![CDATA[<pre>%($summary%)</pre>]]></description> + </item> +% } + </channel> +</rss>