Mercurial > repo
changeset 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 |
files | bin/edit |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/edit Fri Feb 17 04:30:13 2017 +0000 +++ b/bin/edit Fri Feb 17 04:35:25 2017 +0000 @@ -1,3 +1,9 @@ -#!/usr/bin/env python -import sys, os, urllib -print "http://slbkbs.org:5196/edit?path=" + urllib.quote(os.path.realpath(sys.argv[1])) +#!/usr/bin/env python + +import sys, os, urllib + +if len(sys.argv) < 2: + print "usage: edit <path>" + sys.exit(1) + +print "http://slbkbs.org:5196/edit?path=" + urllib.quote(os.path.realpath(sys.argv[1]))