Skip to content
Browse files

"RSS" fetcher is really an Atom fetcher

  • Loading branch information...
1 parent 4fd6b67 commit b2773fc84fc401b2f021f508543a2e86dcff36a5 @apage43 apage43 committed Nov 12, 2012
Showing with 5 additions and 5 deletions.
  1. +1 −1 README.md
  2. +4 −4 src/marky/app.clj
View
2 README.md
@@ -17,7 +17,7 @@ Sample:
{:type :twitter :user "damienkatz" :period 3600 :ttl 60}
{:type :twitter :user "apage43" :period 3600 :ttl 60}
{:type :send-tweet :period 3600 :after 600}
- {:type :rss :url "http://damienkatz.net/rss.php" :period 86400 :ttl 60}]}
+ {:type :atom :url "http://damienkatz.net/rss.php" :period 86400 :ttl 60}]}
```
Run the bot process
View
8 src/marky/app.clj
@@ -25,7 +25,7 @@
:cburl "http://localhost:8091/"
:jobs
[{:type :twitter :user "damienkatz" :period 3600}
- {:type :rss :url "http://damienkatz.net/rss.php" :period 86400}]})
+ {:type :atom :url "http://damienkatz.net/rss.php" :period 86400}]})
(defn get-configuration []
(or (try (read-string (slurp "marky-config.clj"))) default-configuration))
@@ -34,8 +34,8 @@
"The Couchbase Java SDK doesn't like some characters..."
[s] (st/escape s {\space "_" \newline "_" \return "_"}))
-(defn fetch-rss [url]
- (let [sourceid (str "rss=" url)
+(defn fetch-atom [url]
+ (let [sourceid (str "feed=" url)
parsed (zip/xml-zip (xml/parse url))
entries (zip-xml/xml-> parsed :entry)]
(for [entry entries]
@@ -80,7 +80,7 @@
0))))))
(def jobfns
- {:rss (fetchwrap fetch-rss :url)
+ {:atom (fetchwrap fetch-atom :url)
:twitter (fetchwrap fetch-twitter :user)
:send-tweet (fn [{:keys [config]}] (send-tweet config))})

0 comments on commit b2773fc

Please sign in to comment.
Something went wrong with that request. Please try again.