获取github名称-“owner/repo”
github-name的Python项目详细描述
安装
$ [sudo] pip install github-name
函数
function | ^{ |
---|---|
^{ | return a string with github repo name in format of ^{ |
可执行模块
usage | ^{ |
---|---|
^{ | print github repo name in format of ^{ |
示例
$ git remote add github git@github.com:owner/repo.git $ python -m github_name . owner/repo $ python -m github_name . | awk -F"/"'{print $1}' owner $ python -m github_name . | awk -F"/"'{print $2}' repo
>>>importgithub_name>>>github_name.get()'owner/repo'
打印每个回购的回购名称:
$ find ~/git -type d -mindepth 1 -maxdepth 1 -exec python -m github_name {}\;