cool - rss now works :-)
This commit is contained in:
parent
21467128a6
commit
3f59652d05
2 changed files with 4 additions and 4 deletions
|
@ -15,8 +15,8 @@
|
||||||
[]
|
[]
|
||||||
(rss.))
|
(rss.))
|
||||||
|
|
||||||
(defn parse-feed [payload]
|
(defn parse-feed [item]
|
||||||
(for [{:keys [title isoDate pubDate content link]} (:items payload)]
|
(let [{:keys [title isoDate pubDate content link]} item]
|
||||||
{:created-at (js/Date. (or isoDate pubDate))
|
{:created-at (js/Date. (or isoDate pubDate))
|
||||||
:text (str title
|
:text (str title
|
||||||
"\n\n"
|
"\n\n"
|
||||||
|
|
|
@ -172,13 +172,13 @@
|
||||||
(let [{:keys [source target resolve-urls?]} transformation]
|
(let [{:keys [source target resolve-urls?]} transformation]
|
||||||
(fn [payload]
|
(fn [payload]
|
||||||
(->> (infra/js->edn payload)
|
(->> (infra/js->edn payload)
|
||||||
|
(:items)
|
||||||
(map rss/parse-feed)
|
(map rss/parse-feed)
|
||||||
(debug)
|
|
||||||
(filter #(> (:created-at %) last-post-time))
|
(filter #(> (:created-at %) last-post-time))
|
||||||
(remove #(blocked-content? transformation (:text %)))
|
(remove #(blocked-content? transformation (:text %)))
|
||||||
(map #(intermediate-resolve-urls resolve-urls? %))
|
(map #(intermediate-resolve-urls resolve-urls? %))
|
||||||
(map #(twitter/nitter-url source %))
|
|
||||||
(map #(perform-replacements transformation %))
|
(map #(perform-replacements transformation %))
|
||||||
|
(debug)
|
||||||
(map #(intermediate-to-mastodon mastodon-auth target %))
|
(map #(intermediate-to-mastodon mastodon-auth target %))
|
||||||
(masto/post-items mastodon-auth target last-post-time)))))
|
(masto/post-items mastodon-auth target last-post-time)))))
|
||||||
|
|
||||||
|
|
Reference in a new issue