gh-index

0.0.2 • Public • Published

gh-index

Calculate h-index of a GitHub user's repo stars

npm npm GitHub last commit GitHub code size in bytes license

TL;DR

npm i -g gh-index
# Generate a token at https://github.com/settings/tokens 
echo the-token > ~/.gh-index
gh-index                          # h-index of myself 
gh-index -a                       # other indexes of myself 
gh-index [-a] /mutual             # ... of my followers intersect following 
gh-index [-a] /friends            # ... of my followers union following 
gh-index [-a] /followers          # ... of my followers 
gh-index [-a] /followings         # ... of my following 
gh-index [-a] b1f6c1c4 IoriOikawa # ... of some one(s) else 
gh-index show-limit               # check how many API calls left 

Usage

gh-index [show-limit | who..]

Calculate h-index of Github users

Commands:
  gh-index    show-limit       Show GitHub API usage and limit
  gh-index    analyze [who..]  Calculate h-index of Github users       [default]

Positionals:
  who  <username>{,/mutual[s],/friends,/followers,/following}           [string]

Options:
  --version       Show version number                                  [boolean]
  --token-file    Github token file for full control of private repos, see
                  https://github.com/settings/tokens
                                               [string] [default: "~/.gh-index"]
  -t, --token     Github token for full control of private repos, see
                  https://github.com/settings/tokens                    [string]
  --help          Show help                                            [boolean]
  -a, --all       Also calculate g-index and others   [boolean] [default: false]
  -j, --json      Show in json format                 [boolean] [default: false]
  -l, --list      List repos that has more stars than the owner's h-index
                                                      [boolean] [default: false]
  -L, --list-all  List all repos                      [boolean] [default: false]

Note

It use GitHub Api v3. The rate limit is 60 requests per hour for unauthenticated requests. See https://developer.github.com/v3/#rate-limiting for details.

API call results are cached to $GH_INDEX_CACHE_DIR, which is $HOME/.cache/gh-index by default. Cache is valid for $GH_INDEX_CACHE_AGE, which is 28800000 (8hr) by default.

Don't take the results too seriously :)

License

Package Sidebar

Install

npm i gh-index

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

20.4 kB

Total Files

10

Last publish

Collaborators

  • b1f6c1c4