comparison bin/wiki @ 12160:2c8c313864e7 draft

<fizzie> slbd wiki//6,7d;s/quote(f)/quote(sys.argv[1])/
author HackEso <hackeso@esolangs.org>
date Tue, 19 Nov 2019 01:22:24 +0000
parents 6f89145cd692
children
comparison
equal deleted inserted replaced
12159:c641aac6a6d0 12160:2c8c313864e7
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 import sys, os.path, urllib 2 import sys, os.path, urllib
3 if len(sys.argv) <= 1: 3 if len(sys.argv) <= 1:
4 print "https://esolangs.org/" 4 print "https://esolangs.org/"
5 else: 5 else:
6 f = os.path.abspath(sys.argv[1])
7 if f.startswith('/hackenv/'): f = f[9:]
8 print ("https://esolangs.org/wiki/" + 6 print ("https://esolangs.org/wiki/" +
9 urllib.quote(f)) 7 urllib.quote(sys.argv[1]))