]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix feed>xml
authorSlava Pestov <slava@factorcode.org>
Thu, 6 Dec 2007 04:16:13 +0000 (23:16 -0500)
committerSlava Pestov <slava@factorcode.org>
Thu, 6 Dec 2007 04:16:13 +0000 (23:16 -0500)
extra/rss/rss.factor
extra/webapps/planet/planet.fhtml [deleted file]
extra/webapps/planet/planet.furnace [new file with mode: 0644]

index da810ee377bc6b27036d2c539a08226ac509e708..0e78208f8666ba91c9da67387121ab6d2a7c3e57 100644 (file)
@@ -74,7 +74,7 @@ C: <entry> entry
 
 : download-feed ( url -- feed )
     #! Retrieve an news syndication file, return as a feed tuple.
-    http-get rot 200 = [
+    http-get-stream rot 200 = [
         nip read-feed
     ] [
         2drop "Error retrieving newsfeed file" throw
@@ -84,12 +84,15 @@ C: <entry> entry
 : simple-tag, ( content name -- )
     [ , ] tag, ;
 
+: simple-tag*, ( content name attrs -- )
+    [ , ] tag*, ;
+
 : entry, ( entry -- )
     "entry" [
-        dup entry-title "title" simple-tag,
+        dup entry-title "title" { { "type" "html" } } simple-tag*,
         "link" over entry-link "href" associate contained*,
         dup entry-pub-date "published" simple-tag,
-        entry-description "content" simple-tag,
+        entry-description "content" { { "type" "html" } } simple-tag*,
     ] tag, ;
 
 : feed>xml ( feed -- xml )
diff --git a/extra/webapps/planet/planet.fhtml b/extra/webapps/planet/planet.fhtml
deleted file mode 100644 (file)
index fb5a673..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<% USING: namespaces html.elements webapps.planet sequences ; %>
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-       <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
-
-       <title>planet-factor</title>
-       <link rel="stylesheet" href="/responder/file/css/news.css" type="text/css" media="screen" title="no title" charset="utf-8" />
-</head>
-
-<body id="index">
-    <h1 class="planet-title">[ planet-factor ]</h1>
-    <table width="100%" cellpadding="10">
-        <tr>
-            <td> <% cached-postings get 20 head print-postings %> </td>
-            <td valign="top" width="25%" class="infobox">
-                <p>
-                    <b>planet-factor</b> is an Atom/RSS aggregator that collects the
-                    contents of <a href="http://factorcode.org/">Factor</a>-related blogs. It is inspired by
-                    <a href="http://planet.lisp.org">Planet Lisp</a>.
-                </p>
-                <p>
-                    This webapp is written in <a href="http://factorcode.org/">Factor</a>.
-                    <% "webapps.planet" browse-webapp-source %>
-                </p>
-                <h2 class="blogroll-title">Blogroll</h2>
-                <% default-blogroll get print-blogroll %>
-                <p>
-                    If you want your weblog added to the blogroll, <a href="http://factorcode.org/gethelp.fhtml">just ask</a>.
-                </p>
-            </td>
-        </tr>
-    </table>
-</body>
-
-</html>
diff --git a/extra/webapps/planet/planet.furnace b/extra/webapps/planet/planet.furnace
new file mode 100644 (file)
index 0000000..bc9172a
--- /dev/null
@@ -0,0 +1,44 @@
+<% USING: namespaces html.elements webapps.planet sequences ; %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+       <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+
+       <title>planet-factor</title>
+       <link rel="stylesheet" href="/responder/file/css/news.css" type="text/css" media="screen" title="no title" charset="utf-8" />
+    <link rel="alternate" type="application/atom+xml" title="Planet Factor - Atom" href="feed.xml" />
+</head>
+
+<body id="index">
+    <h1 class="planet-title">[ planet-factor ]</h1>
+    <table width="100%" cellpadding="10">
+        <tr>
+            <td> <% cached-postings get 20 head print-postings %> </td>
+            <td valign="top" width="25%" class="infobox">
+                <p>
+                    <b>planet-factor</b> is an Atom/RSS aggregator that collects the
+                    contents of <a href="http://factorcode.org/">Factor</a>-related blogs. It is inspired by
+                    <a href="http://planet.lisp.org">Planet Lisp</a>.
+                </p>
+                <p>
+                    <img src="http://planet.lisp.org/feed-icon-14x14.png" />
+                    <a href="feed.xml"> Syndicate </a>
+                </p>
+                <p>
+                    This webapp is written in <a href="http://factorcode.org/">Factor</a>.<br>
+                    <% "webapps.planet" browse-webapp-source %>
+                </p>
+                <h2 class="blogroll-title">Blogroll</h2>
+                <% default-blogroll get print-blogroll %>
+                <p>
+                    If you want your weblog added to the blogroll, <a href="http://factorcode.org/gethelp.fhtml">just ask</a>.
+                </p>
+            </td>
+        </tr>
+    </table>
+</body>
+
+</html>