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

Overview

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 
   
     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

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 res.csv
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.

Comments
  • Working on usability with .py scripts

    Working on usability with .py scripts

    rename writer_func to writer_wrapper move the decorator outside the Writer class file_handle is an instance member close_file_handle is an instance method file_handle initialized in init, __get_file_handle not needed anymore

    opened by Rohitrajak1807 9
  • Restructure

    Restructure

    • Restructure the code into GitCompare class
    • Remove comments
    • Add help descriptions
    • change --outputtype,-o to -t,--type
    • add -o,--output flag
    • add headers to explicitly make request to v3 API

    TODO

    • cleanup
    • move relevant portions of init.py into GitCompare class
    • simplify init.main

    @avaish1409 This is a WIP

    opened by Rohitrajak1807 5
  • __writer_func decorator

    __writer_func decorator

    https://github.com/avaish1409/gitcomp/blob/a721c78c4e1aae0c03e8170718812d0d65bccbde/src/gitcomp/ser_de.py#L69

    @PrasanthChettri it's kinda unclear if the decorator is a static method or class method. Please add the @staticmethod decorator if it is a static method else, do make it a proper instance by making the first parameter self

    opened by Rohitrajak1807 2
  • Bump urllib3 from 1.25.8 to 1.26.5

    Bump urllib3 from 1.25.8 to 1.26.5

    Bumps urllib3 from 1.25.8 to 1.26.5.

    Release notes

    Sourced from urllib3's releases.

    1.26.5

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed deprecation warnings emitted in Python 3.10.
    • Updated vendored six library to 1.16.0.
    • Improved performance of URL parser when splitting the authority component.

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    1.26.4

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    1.26.3

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed bytes and string comparison issue with headers (Pull #2141)

    • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme (Pull #2107)

    If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

    1.26.2

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed an issue where wrap_socket and CERT_REQUIRED wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)

    1.26.1

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Fixed an issue where two User-Agent headers would be sent if a User-Agent header key is passed as bytes (Pull #2047)

    1.26.0

    :warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

    • Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)

    • Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning should opt-in explicitly by setting ssl_version=ssl.PROTOCOL_TLSv1_1 (Pull #2002) Starting in urllib3 v2.0: Connections that receive a DeprecationWarning will fail

    • Deprecated Retry options Retry.DEFAULT_METHOD_WHITELIST, Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST and Retry(method_whitelist=...) in favor of Retry.DEFAULT_ALLOWED_METHODS, Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT, and Retry(allowed_methods=...) (Pull #2000) Starting in urllib3 v2.0: Deprecated options will be removed

    ... (truncated)

    Changelog

    Sourced from urllib3's changelog.

    1.26.5 (2021-05-26)

    • Fixed deprecation warnings emitted in Python 3.10.
    • Updated vendored six library to 1.16.0.
    • Improved performance of URL parser when splitting the authority component.

    1.26.4 (2021-03-15)

    • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

    1.26.3 (2021-01-26)

    • Fixed bytes and string comparison issue with headers (Pull #2141)

    • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme. (Pull #2107)

    1.26.2 (2020-11-12)

    • Fixed an issue where wrap_socket and CERT_REQUIRED wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)

    1.26.1 (2020-11-11)

    • Fixed an issue where two User-Agent headers would be sent if a User-Agent header key is passed as bytes (Pull #2047)

    1.26.0 (2020-11-10)

    • NOTE: urllib3 v2.0 will drop support for Python 2. Read more in the v2.0 Roadmap <https://urllib3.readthedocs.io/en/latest/v2-roadmap.html>_.

    • Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)

    • Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that still wish to use TLS earlier than 1.2 without a deprecation warning

    ... (truncated)

    Commits
    • d161647 Release 1.26.5
    • 2d4a3fe Improve performance of sub-authority splitting in URL
    • 2698537 Update vendored six to 1.16.0
    • 07bed79 Fix deprecation warnings for Python 3.10 ssl module
    • d725a9b Add Python 3.10 to GitHub Actions
    • 339ad34 Use pytest==6.2.4 on Python 3.10+
    • f271c9c Apply latest Black formatting
    • 1884878 [1.26] Properly proxy EOF on the SSLTransport test suite
    • a891304 Release 1.26.4
    • 8d65ea1 Merge pull request from GHSA-5phf-pp7p-vc2r
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 1
  • Make Repository and User .feature_score static

    Make Repository and User .feature_score static

    https://github.com/avaish1409/gitcomp/blob/b2a921d35b299204b4db93c5c23f936e04ec9a34/src/gitcomp/repository.py#L57

    @avaish1409 Please try to refactor feature_score method to a static method as it doesn't require self parameter.

    opened by Rohitrajak1807 0
Releases(v1.0.4)
Owner
Anirudh Vaish
Pythonista | AI Enthusiast | Learning = True
Anirudh Vaish
Plumbum: Shell Combinators

Plumbum: Shell Combinators Ever wished the compactness of shell scripts be put into a real programming language? Say hello to Plumbum Shell Combinator

Tomer Filiba 2.5k Dec 28, 2022
Zecwallet-Python is a simple wrapper around the Zecwallet Command Line LightClient written in Python

A wrapper around Zecwallet Command Line LightClient, written in Python Table of Contents About Installation Usage Examples About Zecw

Priveasy 2 Sep 06, 2022
spotifytools is a Python command line tool

spotifytools spotifytools is a Python command line tool Documentation The documentation is available on the following link Releases Instalation instru

0 Sep 28, 2021
A supercharged AWS command line interface (CLI).

SAWS Motivation AWS CLI Although the AWS CLI is a great resource to manage your AWS-powered services, it's tough to remember usage of: 70+ top-level c

Donne Martin 5.1k Jan 05, 2023
uploadgram uses your Telegram account to upload files up to 2GiB, from the Terminal.

uploadgram uploadgram uses your Telegram account to upload files up to 2GiB, from the Terminal. Heavily inspired by the telegram-upload Installing: pi

Shrimadhav U K 97 Jan 06, 2023
Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juniper Command System is a Micro CLI Tool that allows you to manage your files, launch applications, as well as providing extra tools for OS Management.

Juan Carlos Juárez 1 Feb 02, 2022
A CLI minesweeper application written in 60 LoC python

This is a CLI minesweeper application written in 60 LoC python. You can use d row,column to dig and f row,column to flag/unflag

1 Dec 21, 2021
Convert shellcode into :sparkles: different :sparkles: formats!

Bluffy Convert shellcode into ✨ different ✨ formats! Bluffy is a utility which was used in experiments to bypass Anti-Virus products (statically) by f

pre.empt.dev 305 Dec 17, 2022
Multifunctional library for creating progress bars.

👋 Content Installation Using github Using pypi Quickstart Flags Useful links Documentation Pypi Changelog TODO Contributing FAQ Bar structure ⚙️ Inst

DenyS 27 Jan 01, 2023
grungegirl is the hacker's drug encyclopedia. programmed in python for maximum modularity and ease of configuration.

grungegirl. cli-based drug search for girls. welcome. grungegirl is aiming to be the premier drug culture application. it is the hacker's encyclopedia

Eristava 10 Oct 02, 2022
The project help you to quickly build layouts in terminal,cross-platform

The project help you to quickly build layouts in terminal,cross-platform

gojuukaze 133 Nov 30, 2022
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

808 Jan 04, 2023
split-manga-pages: a command line utility written in Python that converts your double-page layout manga to single-page layout.

split-manga-pages split-manga-pages is a command line utility written in Python that converts your double-page layout manga (or any images in double p

Christoffer Aakre 3 May 24, 2022
Bear-Shell is a shell based in the terminal or command prompt.

Bear-Shell is a shell based in the terminal or command prompt. You can navigate files, run python files, create files via the BearUtils text editor, and a lot more coming up!

MichaelBear 6 Dec 25, 2021
🐍The nx-python plugin allows users to create a basic python application using nx commands.

🐍 NxPy: Nx Python plugin This project was generated using Nx. The nx-python plugin allows users to create a basic python application using nx command

StandUP Communications 74 Aug 31, 2022
ICMP Reverse Shell written in Python 3 and with Scapy (backdoor/rev shell)

icmpdoor - ICMP Reverse Shell icmpdoor is an ICMP rev shell written in Python3 and scapy. Tested on Ubuntu 20.04, Debian 10 (Kali Linux), and Windows

Jeroen van Kessel 206 Dec 29, 2022
Command line tool for interacting and testing warehouse components

Warehouse debug CLI Example usage for Zumo debugging See all messages queued and handled. Enable by compiling the zumo-controller with -DDEBUG_MODE_EN

1 Jan 03, 2022
Simple subcommand CLIs with argparse

multicommand Simple subcommand CLIs with argparse. multicommand uses only the standard library and is ~150 lines of code (modulo comments and whitespa

Andrew Ross 10 Aug 01, 2022
Patool is a portable command line archive file manager

Patool Patool is an archive file manager. Various archive formats can be created, extracted, tested, listed, searched, repacked and compared with pato

318 Jan 04, 2023
StackOverflow in your terminal.

how. How do I ...? This project was started to help developers ask more questions. Table of Contents Installation Usage Foss Community Copyright Insta

Ron Nathaniel 2 Jan 31, 2022