Skip to main content

A python based command line tool to compare Github Users or Repositories.

Project description

gitcomp

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.

Python 3 PyPi Download stats MIT license version

Installation

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.

Examples

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

History

See release notes for changes https://github.com/avaish1409/gitcomp/releases

Development pattern for contributors

  1. Create a fork of the main gitcomp repository on GitHub.
  2. Make your changes in a branch named something different from main and titled as per your contribution, e.g. create a new branch documentation-fixes.
  3. Create a pull request.
  4. Please follow the Python style guide for PEP-8.

License

gitcomp is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gitcomp-1.0.1.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

gitcomp-1.0.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file gitcomp-1.0.1.tar.gz.

File metadata

  • Download URL: gitcomp-1.0.1.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.6

File hashes

Hashes for gitcomp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dfffa789c3e18eea44c7fe1d4acce5c029803c2b04847733383d36adb517f710
MD5 9be3025e7c2d8e2ae36865b07842f2c8
BLAKE2b-256 030348e11f23a2ee831b31bb7b19ad7924bd56e6ea410a0b7a8e393933b4c2e1

See more details on using hashes here.

File details

Details for the file gitcomp-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gitcomp-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.6

File hashes

Hashes for gitcomp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 68114db6c2490b0b37ec040a292d441e6a6c908dd2b2350c0178dd1c5c17a797
MD5 b051d89d0de97f4d8203fa5a974bf81d
BLAKE2b-256 861721febcd905796d39b08e8b7b741f743e190d60d6465e95a4ffa606e2a839

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page