From 6e528248414e330c9e25e81596ab47b8b8a5b701 Mon Sep 17 00:00:00 2001 From: terminaldweller Date: Fri, 14 May 2021 22:44:50 +0430 Subject: first commit --- pygitty.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 pygitty.py (limited to 'pygitty.py') diff --git a/pygitty.py b/pygitty.py new file mode 100755 index 0000000..2f348e1 --- /dev/null +++ b/pygitty.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +from github import Github +import json +import argparse + +class Argparser(object): + def __init__(self): + parser = argparse.ArgumentParser() + parser.add_argument("--repo", type=str, help="repo to look for") + self.args = parser.parse_args() + +def main(): + argparser = Argparser() + passwd = json.load(open("/home/bloodstalker/scripts/github.json"))["pass"] + g = Github(passwd) + repo = g.get_repo(argparser.args.repo) + print(repo.stargazers_count) + +if __name__ == "__main__": + main() -- cgit v1.2.3