fetch_single_repo.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:oss-github-analysis-project 作者: itu-oss-project-team 项目源码 文件源码
def main(argv):
    owner = ""
    repo = ""
    force = False

    try:
        opts, args = getopt.getopt(argv, "o:r:f", ["owner=", "repo=", "force"])
    except getopt.GetoptError:
        print('ERROR in input arguments!')
        sys.exit(2)
    for opt, arg in opts:
        if opt == '-h':  # Help case
            print('fetch_repo.py -o <owner> -r <repo> -f Ex: fetch_repo.py --owner itu-oss-project-team  --repo oss-github-analysis-project --force')
            sys.exit()
        elif opt in ("-o", "--owner"):
            owner = arg
        elif opt in ("-r", "--repo"):
            repo = arg
        elif opt in ("-f", "--force"):
            force = True

    github_harvester = GitHubHarvester()

    #github_harvester.fetch_repo(owner, repo, force_fetch = force)
    github_harvester.fetch_repo('itu-oss-project-team', 'oss-github-analysis-project', force_fetch = True)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号