| 1 |
#!/usr/bin/python
|
| 2 |
|
| 3 |
# Usage: ./minechangelogs word word word...
|
| 4 |
#
|
| 5 |
# Words are matched case-sensitive and simply as substrings (using python's
|
| 6 |
# string.find()).
|
| 7 |
#
|
| 8 |
# An example run for Enrico Zini could be:
|
| 9 |
#
|
| 10 |
# ./minechangelogs "Enrico Zini" enrico@debian.org enrico@enricozini.org
|
| 11 |
#
|
| 12 |
# You can try running it on yourself to see how it works, and as an ego booster
|
| 13 |
# :)
|
| 14 |
|
| 15 |
import urllib
|
| 16 |
import urllib2
|
| 17 |
import sys
|
| 18 |
import shutil
|
| 19 |
|
| 20 |
print >>sys.stderr, "I'm sorry this doesn't work anymore."
|
| 21 |
print >>sys.stderr, "Please use the web interface at https://nm.debian.org/am/minechangelogs"
|
| 22 |
sys.exit(1)
|
| 23 |
|
| 24 |
args = [ ("term", x) for x in sys.argv[1:] ]
|
| 25 |
data = urllib.urlencode(args)
|
| 26 |
|
| 27 |
infd = urllib.urlopen("https://nm.debian.org/cgi-bin/minechangelogs-backend", data)
|
| 28 |
shutil.copyfileobj(infd, sys.stdout)
|
| 29 |
|
| 30 |
sys.exit(0)
|