A simple python package with a CLI to compare GitHub users and repositories by associating a git_score to each entry which is a weighted sum of features mapped to a score. git_score for a user is calculated on the basis of followers, followers to following ratio, number of public gists and number of organisations a user is part of. For a public repository, the determining factors are number of forks, if the repository itself is forked or not, number of stars and number of watchers.


Install via pip:

pip install gitcomp
usage: gitcomp [-h] [-u user_name [user_name ...] | -r repo [repo ...]] [-t output_t] [-o out]

gitcomp A CLI utility to compare the vital stats of GitHub repositories

optional arguments:
  -h, --help            show this help message and exit
  -u user_name [user_name ...], --user user_name [user_name ...]
                        -u, --user <username...> The GitHub username(s) to query against.
                        Multiple usernames can be queried at a time by providing a space
                        separated argument list.
  -r repo [repo ...], --repo repo [repo ...]
                        -r, --repo <repo> The public GitHub repository to query against
                        where repo takes the form: <user/repo>
                        Example: -r octocat/Spoon-Knife
  -t output_t, --type output_t
                        -t, --type <type> Default: ascii. Choose the format of output. 
                        All output is dumped to STDOUT unless output file is specified
                        using -o, --output flag.
                        The types available are: json: Show the result as JSON
                                                 csv: Format the output to CSV 
                                                 ascii: Show the result as an ASCII Table 
                                                 html: Show output as HTML Table
  -o out, --output out  -o, --output <out_file> Output to out_file, defaults to STDOUT.


Comparing Users

gitcomp -u Rohitrajak1807 avaish1409

Comparing Repositories

gitcomp -r avaish1409/VideoChatBot Rohitrajak1807/algorithms

Specifying output type

  • ASCII Table (Default)
gitcomp -u Rohitrajak1807 avaish1409 -t ASCII
  • JSON
gitcomp -u Rohitrajak1807 avaish1409 -t json
  • CSV
gitcomp -u Rohitrajak1807 avaish1409 -t csv
  • HTML Table
gitcomp -u Rohitrajak1807 avaish1409 -t html

Specifying output file

gitcomp -u Rohitrajak1807 avaish1409 -t json -o res.json
gitcomp -u Rohitrajak1807 avaish1409 -t csv -o csv.json
gitcomp -u Rohitrajak1807 avaish1409 -t html -o res.html
gitcomp -u Rohitrajak1807 avaish1409 -o res.txt