Filter Ask HN
This commit is contained in:
parent
da6f779f91
commit
529fa33de5
@ -1,4 +1,4 @@
|
||||
(defproject isahn "1.0.1"
|
||||
(defproject isahn "1.0.2"
|
||||
:description "ISAHN check news stories for Hacker News"
|
||||
:url "http://example.com/FIXME"
|
||||
:micense {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
|
||||
|
@ -60,10 +60,13 @@
|
||||
;; Filter created less 24h
|
||||
(let [stories_24h (filter #(> (get-in % ["time"]) min_time) stories)
|
||||
;; Filter history
|
||||
stories_without_histories (filter #(not (lazy_contains? history_ids (get-in % ["id"]))) stories_24h)]
|
||||
|
||||
;; Filter with score min_score
|
||||
(filter #(> (get-in % ["score"]) min_score) stories_without_histories)))
|
||||
stories_without_histories (filter #(not (lazy_contains? history_ids (get-in % ["id"]))) stories_24h)
|
||||
;; Filter "Ask HN:"
|
||||
stories_without_ask_HN (filter #(not (lazy_contains? "Ask HN:" (get-in % ["title"]))) stories_without_histories)
|
||||
;; Filter with score min_score
|
||||
stories_less_24h (filter #(> (get-in % ["score"]) min_score) stories_without_ask_HN)]
|
||||
;; Return
|
||||
stories_less_24h))
|
||||
|
||||
(defn filter_with_url
|
||||
"Filter by removing stories that do not have the URL property"
|
||||
|
Loading…
Reference in New Issue
Block a user