Created
June 17, 2016 12:25
-
-
Save greenonion/e801ad9ee8b6c22a681a8a00bc929713 to your computer and use it in GitHub Desktop.
Athens Clojure Dojo - 16/06/2016. Parse Clojure project dependencies from Github (unfinished)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clj_gh.gh | |
(:require [cheshire.core :as json])) | |
(defn get-projects [name] | |
(str "https://raw.githubusercontent.com/" | |
name | |
"/master/project.clj")) | |
(defn retrieve-clj-projects [] | |
(let [uri "https://api.github.com/search/repositories?q=language:clojure"] | |
(-> (slurp uri) | |
(json/parse-string true) | |
:items))) | |
(defn project-urls [] | |
(map #(get-projects (:full_name %)) (retrieve-clj-projects))) | |
(defn get-dependencies [uri] | |
(let [a (slurp uri)] | |
(map #(-> % first str) (nth (read-string a) 8)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defproject clj-gh "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.8.0"] | |
[cheshire "5.6.1"]] | |
:main ^:skip-aot clj-gh.core | |
:target-path "target/%s" | |
:profiles {:uberjar {:aot :all}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment