Skip to content

Instantly share code, notes, and snippets.

@gistlyn
Last active January 17, 2021 14:57
Show Gist options
  • Save gistlyn/7bb63bd87e92490bc93a0e04b67fb34a to your computer and use it in GitHub Desktop.
Save gistlyn/7bb63bd87e92490bc93a0e04b67fb34a to your computer and use it in GitHub Desktop.
console-lisp
(def orgName "ServiceStack")
(def json (urlContents
(str "https://api.github.com/orgs/" orgName "/repos")
{ :userAgent "gist.cafe" }))
(def orgRepos (map #(it {
:name (:name %)
:description (:description %)
:lang (:language %)
:url (:url %)
:watchers (:watchers %)
:forks (:forks %)
})
(reverse (sort-by :watchers (parseJson json)))))
(str "Top 3 " orgName " GitHub Repos:")
(dump (take 3 orgRepos))
(str "\nTop 10 " orgName " GitHub Repos:\n")
(textDump (map #(it {
:name (:name %)
:lang (:lang %)
:watchers (:watchers %)
:forks (:forks %)
})
(take 10 orgRepos)))
(inspectVars { :orgRepos orgRepos })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment