获取repo github用户名
github-fullname的Python项目详细描述
安装
$ [sudo] pip install github-fullname
脚本使用
usage: github-fullname path
示例
$ cd path/to/repo
$ github-fullname .
owner/repo
$ find ~/git -type d -mindepth 1 -maxdepth 1 -exec github-fullname {}\;
owner/repo1
SKIP (~/git/repo2): .git NOT EXISTS
owner/repo3
...
usage: github-fullname path
示例
$ cd path/to/repo
$ github-fullname .
owner/repo
$ find ~/git -type d -mindepth 1 -maxdepth 1 -exec github-fullname {}\; owner/repo1 SKIP (~/git/repo2): .git NOT EXISTS owner/repo3 ...
隐藏错误
$ find ~/git -maxdepth 1 -exec github-fullname {}\;2> /dev/null owner/repo1 owner/repo3 ...
显示github孤立回购:
$ python -m github_repos | grep -v "$(find ~/git -maxdepth 1 -exec github-fullname {}\;2> /dev/null)"
删除github孤立回购:
$ python -m github_repos | grep -v "$(find ~/git -maxdepth 1 -exec github-fullname {}\;2> /dev/null)"| xargs python -m github_delete