Fix feed>xml
parent
5400dc645a
commit
214974ec52
|
@ -74,7 +74,7 @@ C: <entry> entry
|
||||||
|
|
||||||
: download-feed ( url -- feed )
|
: download-feed ( url -- feed )
|
||||||
#! Retrieve an news syndication file, return as a feed tuple.
|
#! Retrieve an news syndication file, return as a feed tuple.
|
||||||
http-get rot 200 = [
|
http-get-stream rot 200 = [
|
||||||
nip read-feed
|
nip read-feed
|
||||||
] [
|
] [
|
||||||
2drop "Error retrieving newsfeed file" throw
|
2drop "Error retrieving newsfeed file" throw
|
||||||
|
@ -84,12 +84,15 @@ C: <entry> entry
|
||||||
: simple-tag, ( content name -- )
|
: simple-tag, ( content name -- )
|
||||||
[ , ] tag, ;
|
[ , ] tag, ;
|
||||||
|
|
||||||
|
: simple-tag*, ( content name attrs -- )
|
||||||
|
[ , ] tag*, ;
|
||||||
|
|
||||||
: entry, ( entry -- )
|
: entry, ( entry -- )
|
||||||
"entry" [
|
"entry" [
|
||||||
dup entry-title "title" simple-tag,
|
dup entry-title "title" { { "type" "html" } } simple-tag*,
|
||||||
"link" over entry-link "href" associate contained*,
|
"link" over entry-link "href" associate contained*,
|
||||||
dup entry-pub-date "published" simple-tag,
|
dup entry-pub-date "published" simple-tag,
|
||||||
entry-description "content" simple-tag,
|
entry-description "content" { { "type" "html" } } simple-tag*,
|
||||||
] tag, ;
|
] tag, ;
|
||||||
|
|
||||||
: feed>xml ( feed -- xml )
|
: feed>xml ( feed -- xml )
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
<title>planet-factor</title>
|
<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="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>
|
</head>
|
||||||
|
|
||||||
<body id="index">
|
<body id="index">
|
||||||
|
@ -23,7 +24,11 @@
|
||||||
<a href="http://planet.lisp.org">Planet Lisp</a>.
|
<a href="http://planet.lisp.org">Planet Lisp</a>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This webapp is written in <a href="http://factorcode.org/">Factor</a>.
|
<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 %>
|
<% "webapps.planet" browse-webapp-source %>
|
||||||
</p>
|
</p>
|
||||||
<h2 class="blogroll-title">Blogroll</h2>
|
<h2 class="blogroll-title">Blogroll</h2>
|
Loading…
Reference in New Issue