<oerjan> chmod +x url; mv url bin
author |
HackBot |
date |
Sat, 19 Apr 2014 23:50:37 +0000 |
parents |
5a4571b62410 |
children |
b873f9de779b |
rev |
line source |
4531
|
1 #!/usr/bin/env python
|
4587
|
2 import sys, re, urllib
|
4531
|
3 if len(sys.argv) <= 1:
|
|
4 print "http://codu.org/projects/hackbot/fshg/"
|
|
5 else:
|
4587
|
6 f = re.sub(r"^/hackenv/", "", sys.argv[1])
|
|
7 if f.startswith("/"):
|
|
8 sys.exit("File is outside hg repository")
|
|
9 else:
|
|
10 print ("http://codu.org/projects/hackbot/fshg/index.cgi/file/tip/" +
|
|
11 urllib.quote(f))
|