building correctly

This commit is contained in:
Anish Lakhwara 2022-03-25 17:18:06 +10:00
parent ea998350be
commit dfba351059

View file

@ -1,13 +1,8 @@
(ns rss-tumblr.core (ns rss-tumblr.core
[:require [crouton.html :as html (:require [crouton.html :as html]
clojure.xml :as xml]]) [clojure.xml :as xml]))
(defn foo (comment (html/parse "https://tumblr.com"))
"I don't do a whole lot."
[x]
(println x "Hello, World!"))
(html/parse "https://tumblr.com")
(defn getFeeds (defn getFeeds
[opml-file] [opml-file]
@ -31,4 +26,19 @@
; get the rss feed url ; get the rss feed url
(:attrs) (:attrs)
(:xmlUrl) (: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"
)