aboutsummaryrefslogtreecommitdiffstats
path: root/pygitty.py
blob: bd0ae772eb4b2e88b91a2e993dd1842aa73b892e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/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()