aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/data
diff options
context:
space:
mode:
authorGravatar Mason Larobina <mason.larobina@gmail.com>2009-08-08 23:14:42 +0800
committerGravatar Mason Larobina <mason.larobina@gmail.com>2009-08-08 23:14:42 +0800
commit90987b18866bac58a2b37a863507284360463923 (patch)
treeafe427bd2788d41d21bb5ce238de52be54e8e282 /examples/data
parentc52adae384101be50477c3b72581dc583e992480 (diff)
parenta3e43f3f7de8f2af7a917ac43439998686191c42 (diff)
Merge branch 'experimental' into cookie_daemon
Diffstat (limited to 'examples/data')
-rwxr-xr-xexamples/data/uzbl/scripts/uzblcat22
1 files changed, 7 insertions, 15 deletions
diff --git a/examples/data/uzbl/scripts/uzblcat b/examples/data/uzbl/scripts/uzblcat
index 5c3063e..e955608 100755
--- a/examples/data/uzbl/scripts/uzblcat
+++ b/examples/data/uzbl/scripts/uzblcat
@@ -1,20 +1,12 @@
-#!/usr/bin/env perl
+#!/usr/bin/env python
# uzblcat - safely push html to uzbl
# See http://www.uzbl.org/wiki/html-mode
-use strict; use warnings;
-my $html;
-local $/; # slurp files
-# automagically choose to read from stdin/files/...
-$html .= $_ for <>;
+from sys import stdin, stdout
-my $endmarker = rand;
-$endmarker .= rand() while $html =~ /^\Q$endmarker\E$/m;
+stdout.write("uri data:text/html,")
+for line in stdin:
+ stdout.write(line[0:-1])
+
+# vim: set noet ff=unix
-print "set base_url = $ENV{BASE_URL}\n" if $ENV{BASE_URL};
-print << "EOS";
-set html_endmarker = $endmarker
-set mode = 1
-$html
-$endmarker
-EOS