annotate bin/edit @ 10310:fc068f57c09a

<oerjan> learn `edit <file> gives you a url, then in your browser: (1) Press Fetch (2) Make your changes (3) Press edit (4) Paste the command line at the top into the channel.
author HackBot
date Fri, 17 Feb 2017 18:53:50 +0000
parents 520f4f114d5d
children 8c93629c5394
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10308
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
1 #!/usr/bin/env python
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
2
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
3 import sys, os, urllib
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
4
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
5 if len(sys.argv) < 2:
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
6 print "usage: edit <path>"
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
7 sys.exit(1)
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
8
520f4f114d5d <shachaf> fetch bin/edit http://slbkbs.org:5196/get?path=%2Fhackenv%2Fbin%2Fedit
HackBot
parents: 10307
diff changeset
9 print "http://slbkbs.org:5196/edit?path=" + urllib.quote(os.path.realpath(sys.argv[1]))