Skip to content

Instantly share code, notes, and snippets.

@viebel
Last active January 15, 2019 06:52
Show Gist options
  • Save viebel/b53056a194e3d54650198e364ba6fb10 to your computer and use it in GitHub Desktop.
Save viebel/b53056a194e3d54650198e364ba6fb10 to your computer and use it in GitHub Desktop.
(require '[clojure.string :refer [join]])
(def d (js->clj js/data :keywordize-keys true))
(print
(join "\n"
(->> (:topics d)
(remove #(get-in % [:factors :bad]))
(remove #(<= (:count %) (+ (get-in % [:factors :automated] 0)
(get-in % [:factors :autoEmail] 0)
(get-in % [:factors :reFilt] 0))))
(remove #(not= 0 (get-in % [:factors :childCount])))
(filter #(= (:count %) 1))
(map #(vector (:topicId %) (get-in % [:artifactsRef 0 :topicText]) (:count %)))
(map #(join "," %)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment