diff options
-rw-r--r-- | cljssss-g.clj | 32 | ||||
-rw-r--r-- | opml.st | 2 |
2 files changed, 13 insertions, 21 deletions
diff --git a/cljssss-g.clj b/cljssss-g.clj index 59441db..6f77200 100644 --- a/cljssss-g.clj +++ b/cljssss-g.clj @@ -31,26 +31,18 @@ (defn opml-string [id] (with-dbt (sql/with-query-results - results - ["SELECT feed.uri, feed.link, user_feed_link.title FROM feed, user_feed_link WHERE user_feed_link.feed=feed.id AND user_feed_link.user=?" id] - (str - "<?xml version=\"1.0\" encoding=\"utf-8\"?><opml version=\"1.0\"><head>" - "<dateCreated>blah</dateCreated>" - "<title>Gödel-Gentzen Clojure Syndication Services Super System Feed Export</title></head><body>" - (loop [clstr "" r results] - (if (first r) - (recur - (str clstr - "<outline text=\"" - (:title (first r)) - "\" xmlUrl=\"" - (:uri (first r)) - "\" htmlUrl=\"" - (:link (first r)) - "\" />") - (rest r)) - clstr)) - "</body></opml>")))) + results + ["SELECT feed.uri, feed.link, user_feed_link.title FROM feed, user_feed_link WHERE user_feed_link.feed=feed.id AND user_feed_link.user=?" id] + (.toString (doto (.getInstanceOf templates "opml") + (.setAttributes {"date" "" ;FIXME + "feeds" + (map (fn [{title :title + uri :uri + link :link}] + {"text" title + "xmlurl" uri + "htmlurl" link}) + results)})))))) (defn lynxy-feedlist [id] (with-dbt @@ -2,7 +2,7 @@ <opml version="1.0"> <head> <dateCreated>$date$</dateCreated> - <title>Gödel-Gentzen Clojure Syndication Services Super System Feed Export</title> + <title>Gödel-Gentzen Clojure Syndication Services Super System Feed Export</title> </head> <body> $feeds:{f | |