public
Description: Python interface for talking to the github API
Clone URL: git://github.com/dustin/py-github.git
dustin (author)
Sun May 25 01:18:39 -0700 2008
commit  f46e25fbaa8923e169ddce7afbb2dc8339cc50d6
tree    a4c9ef27dfe7c0885839df9d8c78e01f4b62345b
parent  30659ad20a090751efa902a5a9db405c96fc8291
py-github / ghsearch.py
100755 19 lines (14 sloc) 0.389 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
 
import sys
 
import github
 
def usage():
    """display the usage and exit"""
    print "Usage: %s keyword [keyword...]" % (sys.argv[0])
    sys.exit(1)
 
if __name__ == '__main__':
    g = github.GitHub()
    if len(sys.argv) < 2:
        usage()
    res = g.search(' '.join(sys.argv[1:]))
 
    for repo in res:
        print "Found %s at %s" % (repo.name, repo.url)