From ec6eea0f30f08bc3cee252649f8b16d5c5abc67b Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sun, 29 Nov 2009 15:49:36 +0100 Subject: remove old/deprecated scripts --- examples/data/uzbl/scripts/clipboard.sh | 17 --------------- examples/data/uzbl/scripts/cookies.py | 37 --------------------------------- examples/data/uzbl/scripts/cookies.sh | 2 +- examples/data/uzbl/scripts/yank.sh | 17 --------------- 4 files changed, 1 insertion(+), 72 deletions(-) delete mode 100755 examples/data/uzbl/scripts/clipboard.sh delete mode 100755 examples/data/uzbl/scripts/cookies.py delete mode 100755 examples/data/uzbl/scripts/yank.sh (limited to 'examples/data/uzbl/scripts') diff --git a/examples/data/uzbl/scripts/clipboard.sh b/examples/data/uzbl/scripts/clipboard.sh deleted file mode 100755 index 60567d3..0000000 --- a/examples/data/uzbl/scripts/clipboard.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# with this script you can store the current url in the clipboard, or go to the url which is stored in the clipboard. - -clip=xclip - -fifo="$5" -action="$1" -url="$7" - -selection=`$clip -o` - -case $action in - "yank" ) echo -n "$url" | eval "$clip";; - "goto" ) echo "uri $selection" > "$fifo";; - * ) echo "clipboard.sh: invalid action";; -esac diff --git a/examples/data/uzbl/scripts/cookies.py b/examples/data/uzbl/scripts/cookies.py deleted file mode 100755 index 10f90fa..0000000 --- a/examples/data/uzbl/scripts/cookies.py +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env python - -import StringIO, cookielib, os, sys, urllib2 - -if __name__ == '__main__': - action = sys.argv[8] - uri = urllib2.urlparse.ParseResult( - scheme=sys.argv[9], - netloc=sys.argv[10], - path=sys.argv[11], - params='', - query='', - fragment='').geturl() - set_cookie = sys.argv[12] if len(sys.argv)>12 else None - - if 'XDG_DATA_HOME' in os.environ.keys() and os.environ['XDG_DATA_HOME']: - f = os.path.join(os.environ['XDG_DATA_HOME'],'uzbl/cookies.txt') - else: - f = os.path.join(os.environ['HOME'],'.local/share/uzbl/cookies.txt') - jar = cookielib.MozillaCookieJar(f) - - try: - jar.load(ignore_discard=True) - except: - pass - - req = urllib2.Request(uri) - - if action == 'GET': - jar.add_cookie_header(req) - if req.has_header('Cookie'): - print req.get_header('Cookie') - elif action == 'PUT': - hdr = urllib2.httplib.HTTPMessage(StringIO.StringIO('Set-Cookie: %s' % set_cookie)) - res = urllib2.addinfourl(StringIO.StringIO(), hdr, req.get_full_url()) - jar.extract_cookies(res,req) - jar.save(ignore_discard=True) diff --git a/examples/data/uzbl/scripts/cookies.sh b/examples/data/uzbl/scripts/cookies.sh index 339c6fc..ee2ce51 100755 --- a/examples/data/uzbl/scripts/cookies.sh +++ b/examples/data/uzbl/scripts/cookies.sh @@ -4,7 +4,7 @@ set -n; # THIS IS EXPERIMENTAL AND COULD BE INSECURE !!!!!! -# this is an example bash script of how you could manage your cookies. it is very raw and basic and not as good as cookies.py +# this is an example bash script of how you could manage your cookies. it is very raw and basic and not as good as uzbl-cookie-daemon # we use the cookies.txt format (See http://kb.mozillazine.org/Cookies.txt) # This is one textfile with entries like this: # kb.mozillazine.org FALSE / FALSE 1146030396 wikiUserID 16993 diff --git a/examples/data/uzbl/scripts/yank.sh b/examples/data/uzbl/scripts/yank.sh deleted file mode 100755 index 376b7e2..0000000 --- a/examples/data/uzbl/scripts/yank.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh -# use this script to pipe any variable to xclip, so you have it in your clipboard -# in your uzbl config, make the first argument the number of the (later) argument you want to use (see README for list of args) -# make the 2nd argument one of : primary, secondary, clipboard. -# examples: -# bind yurl = spawn ./examples/scripts/yank.sh 6 primary -# bind ytitle = spawn ./examples/scripts/yank.sh 7 clipboard - -clip=xclip - -which $clip &>/dev/null || exit 1 -[ "x$9" = xprimary -o "x$9" = xsecondary -o "x$9" = xclipboard ] || exit 2 - -value=`eval "echo -n \\${$8}"` # bash: value = ${!8} - -echo "echo -n '${value}' | $clip -selection $9" -echo -n "'${value}' | $clip -selection $9" -- cgit v1.2.3