summaryrefslogtreecommitdiffstats
path: root/fb
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-03-21 16:07:49 +0100
committerFlorian Pritz <bluewind@xssn.at>2010-03-21 16:07:49 +0100
commitcfc8198ba8f71144468bda44147705d36b07bc63 (patch)
tree0ce5869923acce90b920fe6449324829fcb3ece4 /fb
parentd94f90032c15166d00fae974ea8b4d30b5645d13 (diff)
downloadbin-cfc8198ba8f71144468bda44147705d36b07bc63.tar.gz
bin-cfc8198ba8f71144468bda44147705d36b07bc63.tar.xz
fb: fix bugs
-g used old URLs nohup with corrent redirection Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'fb')
-rwxr-xr-xfb8
1 files changed, 5 insertions, 3 deletions
diff --git a/fb b/fb
index 8d24662..92b72b5 100755
--- a/fb
+++ b/fb
@@ -7,10 +7,12 @@
#
#----------------------------------------------------
# only works if useragent contains libcurl
+# Dependencies: python, curl
+# Optional: xclip
#----------------------------------------------------
'''[cat |] %prog [options] [file1 file2 ...]'''
-__version__ = '0.5.1'
+__version__ = '0.5.2'
__desc__ = '''
Upload/nopaste file/stdin to paste.xinu.at and copy URL to clipboard.
'''
@@ -47,7 +49,7 @@ def do_upload(file, extension=None):
], curl_args, ['http://paste.xinu.at/file/do_upload']]),
stdout=PIPE).communicate()[0]
print url
- Popen('echo -n "%s" | nohup &>/dev/null xclip' % url, shell=True)
+ Popen('echo -n "%s" | nohup >/dev/null xclip 2>&1' % url, shell=True)
def delete(id):
pw = password()
@@ -64,7 +66,7 @@ def delete(id):
),).communicate()[0]
def get(id):
- print urlopen('http://paste.xinu.at/d/%s' % id).read()
+ print urlopen('http://paste.xinu.at/%s' % id).read()
def merge(seq):
merged = []