Mercurial > repo
view bin/edit @ 10386:79bc240d537a
<rdococ> le//rn 1+1//1+1 is window as rdocscovered by rdococ in the late 202nd decade.
author | HackBot |
---|---|
date | Fri, 10 Mar 2017 23:51:35 +0000 |
parents | 8c93629c5394 |
children | ace1c1f6c46e |
line wrap: on
line source
#!/usr/bin/env python import sys, os.path, re, urllib if len(sys.argv) < 2: sys.exit('http://hackego.esolangs.org/edit/') f = os.path.realpath(sys.argv[1]) f = re.sub(r"^/+hackenv/", "", f) if re.match(r"/|\.hg(?:/|ignore$|$)",f): sys.exit("File is not editable.") print 'http://hackego.esolangs.org/edit/' + urllib.quote(f)