GitHubリポジトリのスター数ランキングを表示する

# GitHubランキング(スター数)

以下のURLでGitHubのリポジトリスター数ランキングを表示することができます。

https://github.com/search?q=stars:%3E1&s=stars&type=Repositories

また、GitHubのAPIを使うことでJSON形式でもデータを取得することができます。
(リクエストのAcceptヘッダーで `application/vnd.github.mercy-preview+json` を指定する)

```bash
curl -H "Accept: application/vnd.github.mercy-preview+json" "https://api.github.com/search/repositories?q=stars:%3E1&s=stars&type=Repositories"
```

ちなみに、2019年5月21日 11:00 現在での上位30位までリポジトリスター数ランキングは次のようになっております。

## 2019年5月21日 11:00現在 (30位まで)

順位 | リポジトリ | 言語 | スター数
-----|---------|------|-------
1|[freeCodeCamp/freeCodeCamp](https://github.com/freeCodeCamp/freeCodeCamp)|JavaScript|302,827
2|[996icu/996.ICU](https://github.com/996icu/996.ICU)|Rust|244,505
3|[vuejs/vue](https://github.com/vuejs/vue)|JavaScript|138,961
4|[twbs/bootstrap](https://github.com/twbs/bootstrap)|JavaScript|133,413
5|[facebook/react](https://github.com/facebook/react)|JavaScript|129,417
6|[tensorflow/tensorflow](https://github.com/tensorflow/tensorflow)|C++|127,911
7|[EbookFoundation/free-programming-books](https://github.com/EbookFoundation/free-programming-books)|-|123,083
8|[sindresorhus/awesome](https://github.com/sindresorhus/awesome)|-|108,727
9|[getify/You-Dont-Know-JS](https://github.com/getify/You-Dont-Know-JS)|-|102,003
10|[robbyrussell/oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)|Shell|88,435
11|[airbnb/javascript](https://github.com/airbnb/javascript)|JavaScript|85,380
12|[d3/d3](https://github.com/d3/d3)|JavaScript|84,780
13|[github/gitignore](https://github.com/github/gitignore)|-|84,048
14|[kamranahmedse/developer-roadmap](https://github.com/kamranahmedse/developer-roadmap)|-|81,478
15|[jwasham/coding-interview-university](https://github.com/jwasham/coding-interview-university)|-|77,742
16|[facebook/react-native](https://github.com/facebook/react-native)|JavaScript|77,271
17|[microsoft/vscode](https://github.com/microsoft/vscode)|TypeScript|76,427
18|[torvalds/linux](https://github.com/torvalds/linux)|C|75,198
19|[electron/electron](https://github.com/electron/electron)|C++|73,447
20|[facebook/create-react-app](https://github.com/facebook/create-react-app)|JavaScript|67,772
21|[vinta/awesome-python](https://github.com/vinta/awesome-python)|Python|67,580
22|[flutter/flutter](https://github.com/flutter/flutter)|Dart|64,458
23|[donnemartin/system-design-primer](https://github.com/donnemartin/system-design-primer)|Python|63,341
24|[CyC2018/CS-Notes](https://github.com/CyC2018/CS-Notes)|Java|62,784
25|[nodejs/node](https://github.com/nodejs/node)|JavaScript|61,339
26|[FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome)|JavaScript|59,817
27|[daneden/animate.css](https://github.com/daneden/animate.css)|CSS|59,572
28|[axios/axios](https://github.com/axios/axios)|JavaScript|59,553
29|[angular/angular.js](https://github.com/angular/angular.js)|JavaScript|59,527
30|[golang/go](https://github.com/golang/go)|Go|58,315

# 過去のランキング

## 2016年1月10日 11:00現在 (20位まで)

順位 | リポジトリ | 言語 | スター数
-----|---------|------|-------
1    | [twbs/bootstrap](https://github.com/twbs/bootstrap) | CSS | 91,112
2    | [FreeCodeCamp/FreeCodeCamp](https://github.com/FreeCodeCamp/FreeCodeCamp) | JavaScript | 54,803
3    | [vhf/free-programming-books](https://github.com/vhf/free-programming-books) | - | 48,422
4    | [angular/angular.js](https://github.com/angular/angular.js) | JavaScript | 45,878
5    | [mbostock/d3](https://github.com/mbostock/d3) | JavaScript | 45,262
6    | [FortAwesome/Font-Awesome](https://github.com/FortAwesome/Font-Awesome) | HTML | 38,720
7    | [nodejs/node-v0.x-archive](https://github.com/nodejs/node-v0.x-archive) | - | 37,567
8    | [jquery/jquery](https://github.com/jquery/jquery) | JavaScript | 37,471
9    | [facebook/react](https://github.com/facebook/react) | JavaScript | 34,460
10   | [h5bp/html5-boilerplate](https://github.com/h5bp/html5-boilerplate) | JavaScript | 32,386
11   | [robbyrussell/oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) | Shell | 32,045
12   | [github/gitignore](https://github.com/github/gitignore) | - | 31,214
13   | [meteor/meteor](https://github.com/meteor/meteor) | JavaScript | 31,154
14   | [rails/rails](https://github.com/rails/rails) | Ruby | 29,093
15   | [torvalds/linux](https://github.com/torvalds/linux) | C | 28,821
16 | [airbnb/javascript](https://github.com/airbnb/javascript) | JavaScript | 28,407
17 | [Homebrew/homebrew](https://github.com/Homebrew/homebrew) | Ruby | 28,365
18 | [daneden/animate.css](https://github.com/daneden/animate.css) | CSS | 28,361
19 | [docker/docker](https://github.com/docker/docker) | Go | 27,630
20 | [nwjs/nw.js](https://github.com/nwjs/nw.js) | JavaScript | 26,714

# おまけ

GitHubランキング情報のMarkdown形式のテーブルデータを生成するワンライナー

```bash
curl -H "Accept: application/vnd.github.mercy-preview+json" "https://api.github.com/search/repositories?q=stars:%3E1&s=stars&type=Repositories" | jq '.items[] | [.full_name, .html_url, .language // "-", .stargazers_count] | @tsv' -r | awk '{printf("%d|[%s](%s)|%s|%'"'"'d\n", NR, $1, $2, $3, $4)}'
```

# 参考

* Search | GitHub Developer Guide - https://developer.github.com/v3/search/