Skip to main content

CLI Git Sleuth Tool

Project description

Giggity - grab hierarchical data about a github organization, user, or repo

Get information about an organization, user, or repo on github. Stores all data in a json file, organized in a tree of dictionaries for easy database transfer or data analysis. All done through the github api, with or without authentication (authentication highly recommended).

Setup

pip3 install giggity

or clone the repository and run:

pip3 install -r requirements.txt

Operation

giggity.py [-h] [-v] [-a] [-u] [-o] [-O OUTPUT] path

positional arguments:
  path                  name of organization or user (or url of repository)

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         increase output verbosity
  -a, --authenticate    allows github authentication to avoid ratelimiting
  -u, --user            denotes that given input is a user
  -o, --org             denotes that given input is an organization
  -O OUTPUT, --outfile OUTPUT
                        location to put generated json file

Example of Scraping a User

python3 giggity.py -a -O needmorecowbell.json -v -u needmorecowbell
  • This will ask for authentication credentials, put the program into verbose mode, scrape github for the user needmorecowbell, then put the results into needmorecowbell.json

Example of Scraping an Organization

python3 giggity.py -a -o github -O github.json
  • This will ask for authentication, scrape the github organization on github, then put out the results in github.json

Giggity as a Module

  • giggity can also be used as a module -- all data is stored within orgTree as a nested dict.
from giggity import giggity

g = giggity("username","password")
data = g.getUsers("organization-name", followers=True)

print("List of users in organization: ")
for user, info in data.items():
    print(user)

data = g.getEmails("username", verbose=True) # Get any emails found

Other examples of how to use giggity are available in the util folder.

Example Output

When python3 giggity.py -a -u geohot -O output.json is used..

output.json contains:

{
    "emails": [
        "george@comma.ai",
        "other emails taken out of example"
    
    ],
    "names": [
        "Charles Ellis",
        "George Hotz"
    ],
    "repos": {
        "ORB_SLAM2": {
            "created_at": "2017-04-08T00:21:13Z",
            "description": "ORBSLAM2 running on Mac OS X cause I was on a plane and bored and maybe useful for someone?",
            "fork": true,
            "name": "ORB_SLAM2",
            "updated_at": "2018-10-22T23:51:28Z",
            "url": "https://github.com/geohot/ORB_SLAM2"
        },
        { Many more repositories cut out for the example },
        "xnu-deps-linux": {
            "created_at": "2013-10-02T00:36:29Z",
            "description": "Mig/cctools for Linux combo makefile thingy",
            "fork": true,
            "name": "xnu-deps-linux",
            "updated_at": "2016-05-01T16:04:45Z",
            "url": "https://github.com/geohot/xnu-deps-linux"
        }
    }
}

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

giggity-1.0.1.tar.gz (5.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: giggity-1.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for giggity-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5d64ec07b908c4e6452e02d196be946e985b586df93ed17d5ed420bf443d1c0c
MD5 6fa97506041ba3b0c53999516366b361
BLAKE2b-256 f963e601e0031b7377c88a0e6e55727a226298e747856f381135db41ccb651f7

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