https://github.com/avaish1409/gitcomp
A python based command line tool to compare Github Users or Repositories
https://github.com/avaish1409/gitcomp
command-line-tool github-api pypi-package python python3 saas
Last synced: 6 days ago
JSON representation
A python based command line tool to compare Github Users or Repositories
- Host: GitHub
- URL: https://github.com/avaish1409/gitcomp
- Owner: avaish1409
- License: mit
- Created: 2021-05-01T06:09:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-16T14:50:36.000Z (over 4 years ago)
- Last Synced: 2025-09-28T02:30:06.610Z (4 months ago)
- Topics: command-line-tool, github-api, pypi-package, python, python3, saas
- Language: Python
- Homepage: https://avaish1409.github.io/gitcomp/
- Size: 65.4 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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**.
[](https://www.python.org/downloads/release/python-360/)
[](http://pepy.tech/project/gitcomp)
[](https://lbesson.mit-license.org/)
[](https://github.com/avaish1409/gitcomp/releases)
# Installation
Install via pip:
```shell
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 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 The public GitHub repository to query against
where repo takes the form:
Example: -r octocat/Spoon-Knife
-t output_t, --type output_t
-t, --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 Output to out_file, defaults to STDOUT.
```
# Examples
## Comparing Users
```shell
gitcomp -u Rohitrajak1807 avaish1409
```
## Comparing Repositories
```shell
gitcomp -r avaish1409/VideoChatBot Rohitrajak1807/algorithms
```
## Specifying output type
- ASCII Table (Default)
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t ASCII
```
- JSON
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t json
```
- CSV
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t csv
```
- HTML Table
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t html
```
## Specifying output file
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t json -o res.json
```
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t csv -o res.csv
```
```shell
gitcomp -u Rohitrajak1807 avaish1409 -t html -o res.html
```
```shell
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](https://help.github.com/articles/fork-a-repo/) of
the [main gitcomp repository](https://github.com/avaish1409/gitcomp) 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](https://help.github.com/articles/creating-a-pull-request/).
4. Please follow the [Python style guide for PEP-8](https://www.python.org/dev/peps/pep-0008/).
# License
gitcomp is licensed under the [MIT License](https://github.com/avaish1409/gitcomp/blob/main/LICENSE).