diff --git a/src/rss_tumblr/core.clj b/src/rss_tumblr/core.clj index be58525..c1aa41a 100644 --- a/src/rss_tumblr/core.clj +++ b/src/rss_tumblr/core.clj @@ -1,13 +1,8 @@ (ns rss-tumblr.core - [:require [crouton.html :as html - clojure.xml :as xml]]) + (:require [crouton.html :as html] + [clojure.xml :as xml])) -(defn foo - "I don't do a whole lot." - [x] - (println x "Hello, World!")) - -(html/parse "https://tumblr.com") +(comment (html/parse "https://tumblr.com")) (defn getFeeds [opml-file] @@ -31,4 +26,19 @@ ; get the rss feed url (:attrs) (:xmlUrl) - (html/parse)) + ; grab content from the feed + (html/parse) + ; get the vector of posts + (:content) + (filterv #(not (nil? (% :content)))) + ; RSS is weird... + ; I should probably use a library for this + (first) + (:content) + (first) + (:content) + (first) + (:content) + ; -- vector of posts achieved + ; we only care about :tag "item" + )