diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-07 22:37:44 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2009-06-07 22:37:44 +0200 |
commit | 19489f84dbf0316222e27216c622929492d6fe4d (patch) | |
tree | cfa7f7f6c907edcc1b2c1e6cf53467b44146f935 /examples/data/uzbl/scripts/uzblcat | |
parent | 6cccec4508d6b0290e04716459db6a5790b2a072 (diff) |
make the whole xdg/dev directories /configs etc more sense making. now theres just one config you can directly copy into your home and use without editing. the same config can be used while developing, the Makefile just overrides 2 xdg variables. also the scripts can be a bit simpler now
Diffstat (limited to 'examples/data/uzbl/scripts/uzblcat')
-rwxr-xr-x | examples/data/uzbl/scripts/uzblcat | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/data/uzbl/scripts/uzblcat b/examples/data/uzbl/scripts/uzblcat new file mode 100755 index 0000000..82341c7 --- /dev/null +++ b/examples/data/uzbl/scripts/uzblcat @@ -0,0 +1,20 @@ +#!/usr/bin/env perl +# 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 <>; + +my $endmarker = rand; +$endmarker .= rand() while $html =~ /^\Q$endmarker\E$/m; + +print "set base_url = $ENV{BASE_URL}\n" if $ENV{BASE_URL}; +print << "EOS"; +set html_endmarker = $endmarker +set mode = 1 +$html +$endmarker +EOS |