Closed jrg94 closed 5 years ago
For the last four, I may need to play around with the GitHub API. Here's an example: https://api.github.com/users/therenegadecoder/repos
Apparently, we can query languages which is pretty sweet: https://api.github.com/repos/TheRenegadeCoder/sample-programs/languages
Here's the output:
{
"C": 16259,
"Python": 7227,
"Java": 6453,
"C#": 5558,
"TypeScript": 5113,
"Haskell": 4258,
"Go": 3348,
"Rust": 2959,
"PowerShell": 2184,
"JavaScript": 1417,
"Shell": 1397,
"C++": 1365,
"Ruby": 1317,
"Kotlin": 1314,
"Swift": 1125,
"Dockerfile": 965,
"Visual Basic": 955,
"Brainfuck": 820,
"Vim script": 619,
"TeX": 607,
"Julia": 581,
"Groovy": 501,
"PHP": 474,
"Perl": 423,
"Crystal": 390,
"Scala": 386,
"D": 377,
"OpenEdge ABL": 347,
"Lua": 320,
"Fortran": 282,
"PicoLisp": 271,
"NewLisp": 243,
"Dart": 224,
"Objective-C": 202,
"Scheme": 173,
"COBOL": 108,
"Ada": 100,
"Opa": 100,
"Verilog": 99,
"Elm": 92,
"Erlang": 91,
"Ballerina": 88,
"Agda": 81,
"Golo": 74,
"Pony": 72,
"Red": 57,
"Roff": 54,
"LOLCODE": 51,
"Common Lisp": 49,
"Matlab": 46,
"Forth": 41,
"ABAP": 37,
"Racket": 34,
"Smalltalk": 34,
"Clojure": 33,
"OCaml": 33,
"Csound": 33,
"AppleScript": 31,
"Hack": 27,
"Shen": 26,
"Factor": 22,
"Elixir": 22,
"MoonScript": 22,
"Nim": 21,
"R": 21,
"Tcl": 21,
"Ring": 20,
"REXX": 20
}
Also, it looks like we can explore the repo: https://api.github.com/repos/TheRenegadeCoder/sample-programs/contents/
Looks like we can even display issues which is cool: https://api.github.com/repos/TheRenegadeCoder/sample-programs/issues
The first 4 are silly, but I do want to look into the next four, so I'll keep this issue open.
Summary from #735:
Turns out we can use site.github
but it has a couple drawbacks.
That said, here's a nice example of the available liquid tags:
{% assign repos = site.github.public_repositories %}
{% for repo in repos %}
{{ repo.full_name }}
{% endfor %}
I'd like to deal with this later. Let's get back to tackling existing work.
I'd like to write up a handful of analytics files that we can use around the site to display data info. For instance, I'd like to be able to quickly calculate the following:
{{ site.posts | size }}
{{ site.categories.language | size }}
{{ site.categories.project | size }}
{{ site.tags.LANGUAGE | size }}
As well, as these! However, I'm not worried about these right now... they don't seem to be as easy as the first few.
And, many more!