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
frogtrade9000 - a command-line Rich client for the freqtrade REST API

frogtrade9000 - a command-line Rich client for the freqtrade REST API I found FreqUI too cumbersome and slow on my Raspberry Pi 400 when running multi

Robert Davey 79 Dec 02, 2022
As easy as /aitch-tee-tee-pie/ 🥧 Modern, user-friendly command-line HTTP client for the API era. JSON support, colors, sessions, downloads, plugins & more. https://twitter.com/httpie

HTTPie: human-friendly CLI HTTP client for the API era HTTPie (pronounced aitch-tee-tee-pie) is a command-line HTTP client. Its goal is to make CLI in

HTTPie 25.4k Dec 30, 2022
This is the public repo for the VS Code Extension AT&T i386/IA32 UIUC-ECE391 Syntax Highlighting

AT&T i386 IA32 UIUC ECE391 GCC Highlighter & Snippet & Linter This is the VS Code Extension for UIUC ECE 391, MIT 6.828, and all other AT&T-based i386

Jackgetup 1 Feb 05, 2022
:computer: tmux session manager. built on libtmux

tmuxp, tmux session manager. built on libtmux. We need help! tmuxp is a trusted session manager for tmux. If you could lend your time to helping answe

python utilities for tmux 3.6k Jan 01, 2023
WazirX Portfolio Tracker on your Terminal!

If you have been investing in crypto in India, there is a very good chance that you are using WazirX. If you are using WazirX, then you definitely know that there is no P&L report, no green arrows no

Raunit 15 Jan 10, 2022
A Python-based Wordle solver and CLI player

Wordle A Python-based Wordle solver and CLI player This was created using Python 3.9.7. SPOILER ALERT: the data directory contains spoilers for upcomi

Will Fitzgerald 1 Jul 24, 2022
Very nice SMS & Mail Bomber for Termux and Linux.

Very nice SMS & Mail Bomber for Termux and Linux. Coded with love)))

nordbearbot.dev 5 Nov 06, 2022
A begginer reverse shell tool python.

A begginer reverse shell tool python. Este programa é para apenas estudo e conhecimento. Não use isso em outra pessoas. Não me responsabilizo por uso

Dio brando 2 Jan 05, 2022
This CLI give the possibility to do a queries in Star Wars API and returns a JSON in a terminal.

Star Wars CLI (swcli) This CLI give the possibility to do a queries in Star Wars API and returns a JSON in a terminal. Install $ pip install swcli Qu

Pery Lemke 5 Nov 05, 2021
Terminal-based keyboard testing

kbdtest kbdtest is a simple Python program that tests keyboard input using an interactive, terminal-based, visual keyboard display. It was originally

Ruunyox 12 Jul 19, 2022
Unofficial Open Corporates CLI: OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unofficial open corporates python command line tool.

Unofficial Open Corporates CLI OpenCorporates is a website that shares data on corporations under the copyleft Open Database License. This is an unoff

Richard Mwewa 30 Sep 08, 2022
Zero-config CLI for TypeScript package development

Despite all the recent hype, setting up a new TypeScript (x React) library can be tough. Between Rollup, Jest, tsconfig, Yarn resolutions, ESLint, and

Jared Palmer 10.5k Jan 08, 2023
Projeto Reverse Shell For Python

Use com sabedoria!!! Modo de uso: Linux (inclui Android e Mac): - apt-get update - apt install python3 (ou "python" apenas) - git clone https://github

1 Jan 03, 2022
A terminal written in Python.

PyDOS Read the title and then you'll figure out what this actually is. Running First, download or clone this repo. Next, run run.py. After this, you c

TechStudent10 2 Mar 01, 2022
CLI tool to fix linked references for dates.

Fix Logseq dates This is a CLI tool to fix the date references following a change in date format since the current version (0.4.4) of Logseq does not

Isaac Dadzie 5 May 18, 2022
ServX | Bash Command as a Service

ServX | Bash Command as a Service Screenshots Instructions for running Run python3 servx.py. COMPATIBILITY TESTED ON ARCHLINUX(x64) & DEBIAN(x64) ONLY

ARPSyndicate 2 Mar 11, 2022
liquidctl – liquid cooler control Cross-platform tool and drivers for liquid coolers and other devices

Cross-platform CLI and Python drivers for AIO liquid coolers and other devices

1.7k Jan 08, 2023
Generate your name in Ascii modular type art through the terminal

ASCII Name Generator Designed and developed by Eduardo Aire The ASCII Art Name Generator is a simple program that helps you to have a practical Shell/

Eduardo Aire 1 Nov 17, 2021
PyWordle: A Python-made wordle manual solver

PyWordle: A Python-made wordle manual solver How to use it Start the program with python3 pywordlesolver.py. How it works The program has a simple 5-l

Federico Torrielli 5 Nov 24, 2022
A command-line utility that, given a markdown file, checks whether all its links work.

A command-line utility written in Python that checks validity of links in a markdown file.

Teclado 2 Dec 08, 2021