From cfc8198ba8f71144468bda44147705d36b07bc63 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 21 Mar 2010 16:07:49 +0100 Subject: fb: fix bugs -g used old URLs nohup with corrent redirection Signed-off-by: Florian Pritz --- fb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fb') 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 = [] -- cgit v1.2.3-24-g4f1b