-
-
Save moreta/11214932 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
require "github_api" | |
# スター数を知りたいリポジトリ user/name | |
repos = %W{ | |
allaboutapps/A3GridTableView | |
AlanQuatermain/AQGridView | |
norsez/BDDynamicGridViewController | |
hirohisa/BrickView | |
phranck/CNGridView | |
gmoledina/GMGridView | |
youknowone/GridTableView | |
ixnixnixn/IAInfiniteGridView | |
JackTeam/InstagramThumbnail | |
joecarney/JCGridMenu | |
kristopherjohnson/KJGridLayout | |
kolinkrewinkel/KKGridView | |
sobri909/MGBox2 | |
sobri909/MGBoxKit | |
mwaterfall/MWPhotoBrowser | |
NOUSguide/NGVaryingGridView | |
njdehoog/NHBalancedFlowLayout.git | |
rhodgkins/RDHCollectionViewGridLayout | |
rnystrom/RNGridMenu | |
brewster/SMGridView | |
troyharris/THGridMenu | |
} | |
result = {} | |
repos.each do |r| | |
user, repo = r.split "/" | |
info = nil | |
# たまに404があったりするので適当にrescue | |
begin | |
info = Github.repos.find user, repo | |
rescue | |
next | |
end | |
count = info["stargazers_count"] | |
result["#{r}"] = count | |
end | |
# スター数が多い順にソートして出力 | |
result.sort_by{|k, v| -v}.each do |k, v| | |
printf "%4d: #{k}\n", v | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment