Mercurial > repo
annotate bin/edit @ 10307:96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
author | HackBot |
---|---|
date | Fri, 17 Feb 2017 04:35:25 +0000 |
parents | a05c53048474 |
children | 520f4f114d5d |
rev | line source |
---|---|
10307
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
1 #!/usr/bin/env python |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
2 |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
3 import sys, os, urllib |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
4 |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
5 if len(sys.argv) < 2: |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
6 print "usage: edit <path>" |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
7 sys.exit(1) |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
8 |
96425ae9376f
<shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents:
10306
diff
changeset
|
9 print "http://slbkbs.org:5196/edit?path=" + urllib.quote(os.path.realpath(sys.argv[1])) |